Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

after running the command npm install -g @angular\cli i receive an npm ERR! code ENOLOCAL

I initially used a computer running windows 10 and also on another computer that runs windows 8.1 but, I still receive the same message on both computers. The error log is:

npm ERR! code ENOLOCAL
npm ERR! Could not install from "@angular\cli" as it does not contain a package.json file.

The node and npm versions are 8.2.1 and 5.3.0 respectively.

When I run the command on git bash I receive a different error message. The error log is:

npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "@angularcli": Tags may not have any characters that encodeURIComponent encodes.
like image 460
Sofonias Abathun Avatar asked Dec 14 '22 21:12

Sofonias Abathun


1 Answers

Your command is wrong:

It's @angular/cli with a forward slash not @angular\cli

npm install -g @angular/cli

In order to install angular-cli on windows use

npm install -g @angular/cli in place of npm install –g @angular-cli

like image 132
Ploppy Avatar answered Dec 21 '22 09:12

Ploppy