Quantcast
Viewing latest article 26
Browse Latest Browse All 48

Answer by Jaden Goodwin for Npm install cannot find module 'semver'

i was getting an error saying Permission Denied after running any 'ng' command (ng --version). I googled for a while and tried clearing npm cache npm cache verify, uninstalling my global angular cli (npm uninstall -g @angular/cli) and reinstalling Angular/cli (npm install -g @angular/cli) etc.. but it would give an error say its already installed. but the node_modules folder here wouldn't have any angular folder.. reinstalled node even then restarted my computer.

ANSWER: Finally I found that the ng.cmd and ng.ps1 files in C:\Users\JaGoodwin\AppData\Roaming\npm\ here were still there (in npm folder).. even though I did npm uninstall -g @angular/cli. those files were causing ng (angular/cli) to think it was still installed. i deleted those files then npm install -g @angular/cli@8.3.29 (version i need) I then removed my projects node_modules and then ran npm install and now can run my angular project using ng serve.

Image may be NSFW.
Clik here to view.
enter image description here

C:\Users\JaGoodwin\AppData\Roaming\npm\

Find this by folder searching %APPDATA% in your windows search bar.


Viewing latest article 26
Browse Latest Browse All 48

Trending Articles