Skip to content

Not able to install angular-cli in my mac #2308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arunan123 opened this issue Sep 23, 2016 · 9 comments
Closed

Not able to install angular-cli in my mac #2308

arunan123 opened this issue Sep 23, 2016 · 9 comments

Comments

@arunan123
Copy link

Mac OSX ( El Capitan)

ng --version
//
On running the command(ng --version) i am getting the following error,
Cannot find module 'portfinder'
Error: Cannot find module 'portfinder'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/usr/local/lib/node_modules/angular-cli/commands/serve.js:6:18)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Class.module.exports.includedCommands (/usr/local/lib/node_modules/angular-cli/addon/index.js:21:16)
at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/models/project.js:392:61
at Array.forEach (native)
at Project.addonCommands (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/models/project.js:391:15)
at Project.eachAddonCommand (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/models/project.js:426:30)
at module.exports (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/cli/lookup-command.js:33:13)
at CLI. (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/lib/cli/cli.js:34:26)
at tryCatch (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/lib/rsvp/-internal.js:215:12)
at invokeCallback (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/lib/rsvp/-internal.js:230:13)
at publish (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/lib/rsvp/-internal.js:198:7)
at flush (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/rsvp/dist/lib/rsvp/asap.js:82:5)
at nextTickCallbackWith0Args (node.js:420:9)
at process._tickCallback (node.js:349:13)
//

node --version v4.5.0

  1. I installed node.js and I am trying to install angular-cli using the following command,

sudo npm install -g angular-cli

  1. Attached the Log file, also the following is printed on running the above install command,
    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.5.0
    npm ERR! npm v2.15.9
    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

  1. Log file location,
    npm-debug.txt
@bernhardwaidacher
Copy link

Same problem here.
I had node version 4.5 and npm 2.15.9 and had the same issue. I saw that angular-cli requires npm 3.x and so installed node 6.6.0 which includes npm v3.10.3. I still get errors:

npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.3
npm ERR! path /usr/local/lib/node_modules/.staging/abbrev-e9ea1451
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename


npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-e9ea1451' -> '/usr/local/lib/node_modules/angular-cli/node_modules/npm/node_modules/abbrev'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-e9ea1451' -> '/usr/local/lib/node_modules/angular-cli/node_modules/npm/node_modules/abbrev'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

@bernhardwaidacher
Copy link

After some research I found this: #1190

This helped me. Just deleted angular-cli and then install it. Worked for me

@arunan123
Copy link
Author

@bernhardwaidacher thanks mate. It helped me too.

@arunan123
Copy link
Author

Please close this issue

@JoshWilliams92
Copy link

JoshWilliams92 commented Sep 24, 2016

I was having the same issue for checking my version and generating a new project. I did npm install -g portfinder and then npm install portfinder in the project folder to start the ng serve process.

@jrough
Copy link

jrough commented Dec 8, 2017

I just went through this over and over. If nothing else works you have to search for the old version of cli and delete @angular/cli manually. Then the new one can be installed.

@pixeltag
Copy link

brew install angular-cli
working for me

@alepenchel
Copy link

brew install angular-cli
working for me too.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants