1

This is the error which occurs when I try to run ng serve --open for my app, And it also shows error while ng --version to check version it shows node 17 is not supported with this angular, but when I try to run another app that works but which I downloaded doesn't.

/ Generating browser application bundles (phase: building)...node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at BulkUpdateDecorator.hashFactory (D:\Training\Angular\mCart\node_modules\webpack\lib\util\createHash.js:145:18)
    at BulkUpdateDecorator.update (D:\Training\Angular\mCart\node_modules\webpack\lib\util\createHash.js:46:50)
    at RawSource.updateHash (D:\Training\Angular\mCart\node_modules\webpack\node_modules\webpack-sources\lib\RawSource.js:77:8)
    at NormalModule._initBuildHash (D:\Training\Angular\mCart\node_modules\webpack\lib\NormalModule.js:880:17)
    at handleParseResult (D:\Training\Angular\mCart\node_modules\webpack\lib\NormalModule.js:946:10)
    at D:\Training\Angular\mCart\node_modules\webpack\lib\NormalModule.js:1040:4
    at processResult (D:\Training\Angular\mCart\node_modules\webpack\lib\NormalModule.js:755:11)
    at D:\Training\Angular\mCart\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'
}
Alimur Razi Rana
  • 338
  • 3
  • 15
Aman
  • 11
  • 1
  • 2
  • You can follow this question - https://stackoverflow.com/questions/69750769/error-error0308010cdigital-envelope-routinesunsupported-angular . There is also a github issue for node 17 https://github.com/webpack/webpack/issues/14532#issuecomment-947012063 – Alimur Razi Rana Nov 28 '21 at 03:42
  • @AlimurRaziRana, I just tried everything uninstalling and installing update angular and node but at last this occurs, For one project not for new project as i downloaded this project – Aman Nov 28 '21 at 14:36

2 Answers2

1

It is node latest version support issue, I was facing the same issue, I uninstalled the version from my system and downloaded a downgraded version from the official node website

https://nodejs.org/en/download/releases/

I installed Node.js 16.19.1 and i was able to run ng serve

Atul Patel
  • 11
  • 2
0

You could be running with the latest version of Node, which is not officially supported by Angular, yet. https://angular.io/guide/setup-local#prerequisites

Install the LTS version of Node instead and try again => https://nodejs.org/en/download/

Ε Г И І И О
  • 11,199
  • 1
  • 48
  • 63