Install Angular Unsupported Engine, OSX

Viewed 47013

I am reinstalling my MacBook. And I receive the following message when I install (npm install -g @angular/cli) angular. Any idea why? I suspect the nom version but I comes along with node...

Developments npm install -g @angular/cli
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular/cli@11.1.4',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v15.8.0', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/architect@0.1101.4',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v15.8.0', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/core@11.1.4',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v15.8.0', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@angular-devkit/schematics@11.1.4',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v15.8.0', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@schematics/angular@11.1.4',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v15.8.0', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '@schematics/update@0.1101.4',
npm WARN EBADENGINE   required: { node: '>= 10.13.0', npm: '^6.11.0', yarn: '>= 1.13.0' },
npm WARN EBADENGINE   current: { node: 'v15.8.0', npm: '7.5.2' }
npm WARN EBADENGINE }
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

    added 241 packages, and audited 242 packages in 12s
    
    20 packages are looking for funding
      run `npm fund` for details
    
    found 0 vulnerabilities
4 Answers

Update - 25th Feb 2021

npm 7.5.6 or greater now works with angular-cli versions 9.1.15, 10.2.3, 11.2.2, 12.0.0-next.2 or greater (within each major version) as per this comment from the Angular team

Original Message - 7th Feb 2021

As of writing npm 7 is not fully supported by angular-cli as per this GitHub issue

I also get the same warnings on Windows with current: { node: 'v15.4.0', npm: '7.5.2' }

Angular CLI returns a warning when I run ng new with npm 7 and offers a workaround

npm version 7.5.2 detected.
The Angular CLI currently requires npm version 6.

Please install a compatible version to proceed (`npm install --global npm@6`).

npm 7 was made generally available very recently on 2nd Feb 2021

This an ongoing issue and the npm team have recently added a comment in response to the Angular team to the aforementioned GitHub issue.

I had the same problem. it's working with:

Upgrade the npm version

npm install -g npm@7.22.0

check the current version

This issue is because the npm version

npm WARN EBADENGINE required: { node: '>= 10.13.0', npm: '^6.11.0', yarn: '>= 1.13.0' }

  • node: '>= 10.13.0' angular cli requires a version greater or equal to 10.13.0
  • npm: '^6.11.0' here the caret (^) means "Compatible with version" 6.11 and you have a version 7.5.2

check this post to learn more about npm symbols like ^ or ~

all you have to do is install a compatible version

sudo npm i -g npm@6.11.0

In my case the upgrade to a newer angular-devkit fixed the issue.

Now im using: Angular 11.2.6 with npm 7.6.3

"devDependencies": {
        "@angular-devkit/build-angular": "^0.1102.5",
    ...
Related