microsoft / charticulator

Interactive Layout-Aware Construction of Bespoke Charts
Other
830 stars 115 forks source link

yarn build error: Error: error:0308010C:digital envelope routines::unsupported #1092

Open webmannys opened 11 months ago

webmannys commented 11 months ago

When running yarn build, I got this error:

@Manny % yarn build
   Build: cleanup
   Build: makedirs
   Build: copy
   Build: third_party_data
   Build: typescript
   tsc(21203) tsc
   Build: dtsBundle
   dts-bundle(21223) dts-bundle --name CharticulatorContainer --main dist/scripts/container/index.d.ts --baseDir dist/scripts --out ../../dist/scripts/container.bundle.d.ts
   dts-bundle(21223) dts-bundle version 0.7.3
   dts-bundle(21223) Export TypeScript .d.ts files as an external module definition
   dts-bundle(21223)
   dts-bundle(21224) dts-bundle --name Charticulator --main dist/scripts/app/index.d.ts --baseDir dist/scripts --out ../../dist/scripts/app.bundle.d.ts
   dts-bundle(21224) dts-bundle version 0.7.3
   dts-bundle(21224) Export TypeScript .d.ts files as an external module definition
   dts-bundle(21224)
   Build: sass
   app sass sass/app.scss:dist/styles/app.css
   page sass sass/page.scss:dist/styles/page.css
   Build: webpack
   webpack(21231) webpack --mode=production
   webpack(21231) node:internal/crypto/hash:68
   webpack(21231)   this[kHandle] = new _Hash(algorithm, xofLen);
   webpack(21231)                   ^
   webpack(21231)
   webpack(21231) Error: error:0308010C:digital envelope routines::unsupported
   webpack(21231)     at new Hash (node:internal/crypto/hash:68:19)
   webpack(21231)     at Object.createHash (node:crypto:138:10)
   webpack(21231)     at module.exports (/Users/Shared/charticulator/node_modules/webpack/lib/util/createHash.js:135:53)
   webpack(21231)     at NormalModule._initBuildHash (/Users/Shared/charticulator/node_modules/webpack/lib/NormalModule.js:417:16)
   webpack(21231)     at handleParseError (/Users/Shared/charticulator/node_modules/webpack/lib/NormalModule.js:471:10)
   webpack(21231)     at /Users/Shared/charticulator/node_modules/webpack/lib/NormalModule.js:503:5
   webpack(21231)     at /Users/Shared/charticulator/node_modules/webpack/lib/NormalModule.js:358:12
   webpack(21231)     at /Users/Shared/charticulator/node_modules/loader-runner/lib/LoaderRunner.js:373:3
   webpack(21231)     at iterateNormalLoaders (/Users/Shared/charticulator/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
   webpack(21231)     at iterateNormalLoaders (/Users/Shared/charticulator/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
   webpack(21231)     at /Users/Shared/charticulator/node_modules/loader-runner/lib/LoaderRunner.js:236:3
   webpack(21231)     at context.callback (/Users/Shared/charticulator/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
   webpack(21231)     at /Users/Shared/charticulator/node_modules/babel-loader/lib/index.js:59:71 {
   webpack(21231)   opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
   webpack(21231)   library: 'digital envelope routines',
   webpack(21231)   reason: 'unsupported',
   webpack(21231)   code: 'ERR_OSSL_EVP_UNSUPPORTED'
   webpack(21231) }
   webpack(21231)
   webpack(21231) Node.js v20.9.0
   webpack(21231) terminated with code 1
   webpack(21231) terminated with code 1
zBritva commented 11 months ago

@webmannys try to set NODE_OPTIONS=--openssl-legacy-provider. Look similar to issue described in stackoverflow

webmannys commented 11 months ago

Thanks, that resolved the issue and we successfully build and started the server.