How to Add Node Module to Angular Project If Is Not Schematics Enabled

Install Angular Unsupported Engine, OSX

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.

Unable to uninstall or update Angular CLI from Mac

None of the posts I found worked no matter what I did. And Angular github was useless like in most cases.

Eventually, I have up on uninstalling or updating Angular CLI as none of solutions I found worked. I instead decided to uninstal node from my Mac and reinstall it.

To completely uninstall node, I followed this post
https://www.positronx.io/how-to-uninstall-node-js-and-npm-from-macos/

Once I uninstalled node, ng version no longer was reporting any angular so all good. Then I downloaded latest node and installed it on my Mac. After this I simply issued command to install angular like:

sudo npm install -g @angular/cli

After this, my Angular was on version 13.x



Related Topics



Leave a reply



Submit