Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module portfinder - latest AngularCLI

I've recently re-installed AngularCLI to the latest version, however when I use ng n MyNewProject I get the following error message in the terminal Cannot find module 'portfinder' now I've googled this and many solutions stated do this:

npm uninstall -g angular-cli
npm cache clean 
npm install -g angular-cli@webpack

Now I've done this but still have the same issue, Cannot find module 'portfinder'

Can any suggest what else to try?

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v4.4.7
npm ERR! npm  v2.15.8
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants webpack@*
npm ERR! peerinvalid Peer [email protected] wants webpack@^1.1.0 || ^2 || ^2.1.0-beta
npm ERR! peerinvalid Peer [email protected] wants webpack@^1.12.6 || ^2.1.0-beta
npm ERR! peerinvalid Peer [email protected] wants webpack@1 || 2 || ^2.0.0-beta || ^2.1.0-beta
npm ERR! peerinvalid Peer [email protected] wants webpack@^2.1.0-beta
like image 604
Code Ratchet Avatar asked Dec 03 '25 17:12

Code Ratchet


1 Answers

Angular CLI needs some prerequisites, one of those is npm version 3xxx. I can see npm v2.15.8 in the errors list. https://www.npmjs.com/package/angular-cli#prerequisites

See if you uninstall Angular Cli and update npm, it will be fixed or not.

npm uninstall -g angular-cli
npm cache clean 

npm install npm -g
npm install -g angular-cli
like image 174
Nelly Sattari Avatar answered Dec 06 '25 07:12

Nelly Sattari