I am trying to install with this command "npm install -g @angular/cli".
But I always get the error "Error: not found: python2"
Is there something I am missing here?
This means that NPM is corrupted in your system, and must reinstall NPM. This command takes a few minutes to complete as with this command your system will download the latest Angular/CLI package.
Basically you'll need Python 2.7, make , and a C/C++ compiler (like GCC on unix, Xcode on OS X, or Visual Studio tools on Windows). To tell npm to use Python 2.7 (if you also have a different version installed), run npm config set python /path/to/executable/python2.
Just in case you do not want to downgrade, which is not needed anyways. Then this is what you should do,
Fix node-sass
version issue first:
The issue is with the version of node-sass
(prior to the python2
error). So install it as
npm install node-sass
.
Now run npm install
If it asks to fix using npm audit fix
. Go ahead!
Downgrade to npm version 4, try this:
npm install -g [email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With