Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile from source fails for Node 18 or 20 (on MacOS) #404

Open
ncul777 opened this issue Apr 25, 2024 · 0 comments
Open

Compile from source fails for Node 18 or 20 (on MacOS) #404

ncul777 opened this issue Apr 25, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ncul777
Copy link

ncul777 commented Apr 25, 2024

Describe the bug
I tried to compile Traduora from source with Node 20.11.1 but build step failed. Same with Node 18.20.2. Node 16.20.2 works fine.

To Reproduce
Steps to reproduce the behavior:

  1. Follow instructions at https://docs.traduora.co/docs/deployment#from-source
  2. Download and install latest release of NVM with homebrew
  3. On command line nvm install 20
  4. run ./bin/build.sh
  5. Error below will occur (log show the build step only)
yarn run v1.22.22
$ ng build --prod
Option "--prod" is deprecated: Use "--configuration production" instead.
⠼ Generating browser application bundles (phase: building)...node:internal/crypto/hash:69
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at BulkUpdateDecorator.hashFactory (/Documents/tutorials/traduora/ever-traduora/webapp/node_modules/webpack/lib/util/createHash.js:145:18)
    at BulkUpdateDecorator.update (/Documents/tutorials/traduora/ever-traduora/webapp/node_modules/webpack/lib/util/createHash.js:46:50)
    at RawSource.updateHash (/Documents/tutorials/traduora/ever-traduora/webapp/node_modules/webpack/node_modules/webpack-sources/lib/RawSource.js:77:8)
    at NormalModule._initBuildHash (/Documents/tutorials/traduora/ever-traduora/webapp/node_modules/webpack/lib/NormalModule.js:880:17)
    at handleParseResult (/Documents/tutorials/traduora/ever-traduora/webapp/node_modules/webpack/lib/NormalModule.js:946:10)
    at /Documents/tutorials/traduora/ever-traduora/webapp/node_modules/webpack/lib/NormalModule.js:1040:4
    at processResult (/Documents/tutorials/traduora/ever-traduora/webapp/node_modules/webpack/lib/NormalModule.js:755:11)
    at /Documents/tutorials/traduora/ever-traduora/webapp/node_modules/webpack/lib/NormalModule.js:819:5 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.20.2
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

** Expected behaviour **
Build to success as per node 16

$ ng build --prod
Option "--prod" is deprecated: Use "--configuration production" instead.
✔ Browser application bundle generation complete.
✔ ES5 bundle generation complete.
✔ Copying assets complete.
⠋ Generating index html...1 rules skipped due to selector errors:
  .custom-file-input:lang(en)~.custom-file-label -> unmatched pseudo-class :lang
✔ Index html generation complete.

Initial Chunk Files                      | Names                |      Size
main-es5.1df1a7d76d2967caf7ec.js         | main                 | 728.24 kB
main-es2015.1df1a7d76d2967caf7ec.js      | main                 | 645.60 kB
styles.01bbf1914c416814cd7b.css          | styles               | 182.21 kB
polyfills-es5.00dde4f22ff936a53b64.js    | polyfills-es5        | 138.58 kB
polyfills-es2015.7d57b9012fdef083784f.js | polyfills            |  44.74 kB
runtime-es2015.248076d76e54e7267a25.js   | runtime              |   3.14 kB
runtime-es5.248076d76e54e7267a25.js      | runtime              |   3.14 kB

                                         | Initial ES5 Total    |   1.03 MB
                                         | Initial ES2015 Total | 875.70 kB

Lazy Chunk Files                         | Names                |      Size
760-es5.76ecd20087d1425fdf6f.js          | -                    | 166.65 kB
760-es2015.76ecd20087d1425fdf6f.js       | -                    | 153.78 kB

Build at: 2024-04-25T10:07:30.803Z - Hash: 24f6c26d036f7f0d6a25 - Time: 52327ms
✨  Done in 63.20s.
yarn run v1.22.22
$ tsc && copyfiles src/templates/**/* ../dist
✨  Done in 11.50s.

** Environment:**

  • Macbook Intel chip
  • OS: 14 sonoma
  • Node 18 or 20 (installed via nvm)
@ncul777 ncul777 added bug Something isn't working help wanted Extra attention is needed labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant