Reputation: 2086
I'm having problems in my angular project with errors Unsupported Engines like:
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '@angular-devkit/[email protected]',
npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0 || ^7.5.6', yarn: '>= 1.13.0' },
npm WARN EBADENGINE current: { node: 'v16.15.0', npm: '8.5.5' }
npm WARN EBADENGINE }
for angular-devkit/architect the configuration in package.json is:
"node_modules/@angular-devkit/architect": {
"version": "0.1102.19",
"resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.19.tgz",
"integrity": "sha512-5Opv6H+XyCkuQvQ1jsxw416YqMDPX3dVonMarFGBPLBe8YEXLRTJ60dvmuLsLpWk6ccTd3XiNT7WEJy4ctDc2Q==",
"dev": true,
"dependencies": {
"@angular-devkit/core": "11.2.19",
"rxjs": "6.6.3"
},
"engines": {
"node": ">= 10.13.0",
"npm": "^6.11.0 || ^7.5.6",
"yarn": ">= 1.13.0"
}
}
$ node --version
v16.15.0
$ npm --version
8.5.5
After Angular update
$ npm --version
8.5.5
$ node --version
v16.15.0
$ ng v
Angular CLI: 14.2.1
Node: 16.15.0
Package Manager: npm 8.5.5
OS: win32 x64
Angular: 14.2.0 ... animations, cdk, common, compiler, compiler-cli, core, forms ...
material, platform-browser, platform-browser-dynamic, router
Package n Version
---------------------------------------------------------
@angular-devkit/architect 0.1402.1
@angular-devkit/build-angular 14.2.1
@angular-devkit/core 14.2.1
@angular-devkit/schematics 14.2.1
@angular/cli 14.2.1
@schematics/angular 14.2.1
rxjs 6.6.7
I don't understand how to solve it.
I run nmp install
, npm audit fix --force
, npm update
, ..etc, but nothing seems to fix these errors.
Upvotes: 1
Views: 5208
Reputation: 1681
You are trying to install dependencies using an unsupported npm version.
In the package.json , the npm version is specified to show a warning when the user doesn't have the required npm version installed. the required version is "^6.11.0 || ^7.5.6" but you have 8.5.5 installed
So to fix that :
Solution 1 :
you need to install the right npm version (^6.11.0 || ^7.5.6 )
Solution 2 :
you can disable the engine check by creating a .npmrc file in your root project, and you specify that you want to turn off the engine check for the project by using :
engine-strict=false
Upvotes: 3