i tried creating a new angular application ng new app and i got this error
Node.js version v11.0.0 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.
(node:16120) UnhandledPromiseRejectionWarning: Error: Not supported
at Object.<anonymous> (/home/user/.nvm/versions/node/v11.0.0/lib/node_modules/@angular/cli/bin/bootstrap.js:21:1)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
at Module.require (internal/modules/cjs/loader.js:643:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/home/user/.nvm/versions/node/v11.0.0/lib/node_modules/@angular/cli/bin/ng.js:47:3)
at Module._compile (internal/modules/cjs/loader.js:707:30)
(node:16120) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16120) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
i tried uninstalling node and npm and angular and installing them again but got thesame error
CodePudding user response:
I also faced this issue after updating my node version to 19.x. But then I updated my node version to latest stable version and this issue was resolved. Try updating your node using following steps on this link:
https://codeforgeek.com/update-node-using-npm/
CodePudding user response:
The version of angular should be compatible to certain node version. The LTS node version support to some extent for angular version. For eg. currently angular version 15 is compatible with node version ^14.20.0 || ^16.13.0 || ^18.10.0 (all with LTS).
For the Reference check out already asked Question regarding compatibility of angular and node version
Source : Check out full list of compatibility among various version of angular, node, typescript and rxjs on GitHub Gist