Closed
Description
🐞 Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
Didn't check.Description
After initializing the project with ng new project_name (no routing enabled, scss selected as css preprocessor) I tried to run the project with ng serve. After that I got error: error:0308010C:digital envelope routines::unsupported. After searching on the internet for a solution I found that this error occurs with node 17+. To solve the problem I was advised either to roll back to a previous version of node.js, or to add --openssl-legacy-provider flag. I found that my version of node.js is 16.14.0. I tried to write the flag with the NODE_OPTIONS=--openssl-legacy-provider environment variable, to which I received a complaint that such a flag is not allowed. Then I wrote the following command: ng servce --openssl-legacy-provider, to which I got the same complaint.🔬 Minimal Reproduction
ng new hello_angular
cd hello_angular
ng serve
https://github.com/t3m8ch/angular-error
🔥 Exception or Error
~/T/n/hello_angular ❯❯❯ ng serve master
✔ Browser application bundle generation complete.
Initial Chunk Files | Names | Raw Size
vendor.js | vendor | 1.37 MB |
polyfills.js | polyfills | 294.80 kB |
styles.css, styles.js | styles | 173.69 kB |
main.js | main | 48.20 kB |
runtime.js | runtime | 6.52 kB |
| Initial Total | 1.88 MB
Build at: 2022-05-14T10:07:17.769Z - Hash: 05c5e953898d2687 - Time: 4616ms
./node_modules/rxjs/dist/esm/index.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/observable/innerFrom.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/observable/timer.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/auditTime.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/bufferTime.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/debounceTime.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/delay.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/sampleTime.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/throttleTime.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/timeInterval.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/timeout.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/timeoutWith.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/operators/windowTime.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/scheduled/scheduleAsyncIterable.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/util/isAsyncIterable.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/rxjs/dist/esm/internal/util/isReadableStreamLike.js - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/@angular/common/fesm2015/common.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
./node_modules/@angular/platform-browser/fesm2015/platform-browser.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:67:19)
at Object.createHash (node:crypto:130:10)
at filename (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:102:23)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:128:39
at Generator.next ()
at asyncGeneratorStep (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:3:103)
at _next (/mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:194)
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:364
at new Promise ()
at /mnt/Trash/artem/nodeprojs/hello_angular/node_modules/babel-loader/lib/cache.js:5:97
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
✖ Failed to compile.
^C⏎
🌍 Your Environment
Angular CLI: 13.3.5
Node: 16.14.0
Package Manager: npm 8.3.1
OS: linux x64
Angular: 13.3.8
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1303.5
@angular-devkit/build-angular 13.3.5
@angular-devkit/core 13.3.5
@angular-devkit/schematics 13.3.5
@angular/cli 13.3.5
@ngtools/webpack 13.3.5
@schematics/angular 13.3.5
rxjs 7.5.5
typescript 4.6.4
Fedora Linux 36
Openssl 3.0.2
Node.js installed via dnf package manager