ionic-team / ionic-cli

The Ionic command-line interface
MIT License
1.99k stars 640 forks source link

Node.js v20.11.0 and Ionic 6 #5076

Closed aardrasystems closed 3 months ago

aardrasystems commented 4 months ago

Hi

I am running my Ionic 6 project with the latest version of Node JS.

I am getting the following error, has this been experienced before?

PS G:\AVR_Project\Ionic Projects\App0001-AardraCloud> ionic serve
> ng.cmd run app:serve --host=localhost --port=8100
[ng] ****************************************************************************************
[ng] This is a simple server for use in testing or debugging Angular applications locally.
[ng] It hasn't been reviewed for security issues.
[ng]
[ng] DON'T USE IT FOR PRODUCTION!
[ng] ****************************************************************************************
[ng] - Generating browser application bundles (phase: setup)...
[ng] Compiling @angular/core : es2015 as esm2015
[ng] Compiling @ionic-native/core : module as esm5
[ng] Compiling @angular/common : es2015 as esm2015
[ng] Compiling @ionic-native/splash-screen : module as esm5
[ng] Compiling @ionic-native/status-bar : module as esm5
[ng] Compiling @angular/platform-browser : es2015 as esm2015
[ng] Compiling @angular/router : es2015 as esm2015
[ng] Compiling @angular/platform-browser-dynamic : es2015 as esm2015
[ng] Compiling @angular/forms : es2015 as esm2015
[ng] Compiling @angular/common/http : es2015 as esm2015
[ng] node:internal/crypto/hash:68
[ng]   this[kHandle] = new _Hash(algorithm, xofLen);
[ng]                   ^
[ng] Error: error:0308010C:digital envelope routines::unsupported
[ng]     at new Hash (node:internal/crypto/hash:68:19)
[ng]     at Object.createHash (node:crypto:138:10)
[ng]     at BulkUpdateDecorator.hashFactory (G:\AVR_Project\Ionic Projects\App0001-AardraCloud\node_modules\webpack\lib\util\createHash.js:145:18)
[ng]     at BulkUpdateDecorator.update (G:\AVR_Project\Ionic Projects\App0001-AardraCloud\node_modules\webpack\lib\util\createHash.js:46:50)
[ng]     at G:\AVR_Project\Ionic Projects\App0001-AardraCloud\node_modules\webpack\lib\FileSystemInfo.js:2677:9
[ng]     at processTicksAndRejections (node:internal/process/task_queues:82:21)
[ng]     at runNextTicks (node:internal/process/task_queues:64:3)
[ng]     at process.processImmediate (node:internal/timers:449:9) {
[ng]   opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
[ng]   library: 'digital envelope routines',
[ng]   reason: 'unsupported',
[ng]   code: 'ERR_OSSL_EVP_UNSUPPORTED'
[ng] }
[ng] Node.js v20.11.0
jcesarmobile commented 3 months ago

That's an angular issue, you'll have to update angular or use an older node version