Ionic-cli: Dependency issue

Created on 15 May 2017  路  7Comments  路  Source: ionic-team/ionic-cli

_From @rajeevrmenon97 on May 15, 2017 11:38_

Ionic version: (check one with "x")
[ ] 1.x
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
Cannot install ionic from npm due to dependency error

Expected behavior:
Clean installation

Related code:

npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'ionic/cli-utils' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'ionic'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

_Copied from original issue: driftyco/ionic#11672_

Most helpful comment

npm ERR! npm -v 1.4.9

That's the problem, this is ancient.
https://docs.npmjs.com/troubleshooting/try-the-latest-stable-version-of-npm

All 7 comments

@rajeevrmenon97 There is a "@" missing before "ionic", the package is called "@ionic/cli-utils".

Can you tell us what exact command you executed to get this output?

I get this same error trying to install ionic:

npm install -g ionic

~$ npm install -g ionic
npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"v0.10.29","npm":"1.4.14"})
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'ionic/cli-utils' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'ionic'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

@thephpguy This looks like the reason in your case:

npm WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"v0.10.29","npm":"1.4.14"})

You should try with a newer node/npm.

Turns out I had two version of nodejs installed:

~$ which nodejs
/usr/bin/nodejs

~$ which node
/usr/local/bin/node

The following fixed this issue for me:

sudo apt-get remove --purge nodejs npm && sudo apt-get autoremove --purge
rm /usr/local/bin/node
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm*
sudo apt-get update
sudo apt-get install nodejs
hash -r
npm install ionic

OP @rajeevrmenon97 still might have this problem - but they can answer here if this is the case and then we might help.

I have node v7.10.0 installed, and I am getting this same error when I attempt to run the following command: npm install -g ionic

```C:\Users\nate\OneDrive\Documents\Repos\IonicTraining>npm install -g ionic
npm http GET https://registry.npmjs.org/ionic
npm http 304 https://registry.npmjs.org/ionic
npm http GET https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/opn
npm http GET https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/ionic/cli-utils
npm http 304 https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/opn
npm http 304 https://registry.npmjs.org/chalk
npm http 404 https://registry.npmjs.org/ionic/cli-utils
npm ERR! 404 Not Found
npm ERR! 404
npm ERR! 404 'ionic/cli-utils' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it
npm ERR! 404 It was specified as a dependency of 'ionic'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, or http url, or git url.

npm ERR! System Windows_NT 10.0.15063
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\ProgramData\chocolatey\lib\npm\tools\node_modules\npm\bin\npm-cli.js" "install" "-g" "ionic"
npm ERR! cwd C:\Users\nate\OneDrive\Documents\Repos\IonicTraining
npm ERR! node -v v7.10.0
npm ERR! npm -v 1.4.9
npm ERR! code E404
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\nate\OneDrive\Documents\Repos\IonicTrainingnpm-debug.log
npm ERR! not ok code 0
```

npm ERR! npm -v 1.4.9

That's the problem, this is ancient.
https://docs.npmjs.com/troubleshooting/try-the-latest-stable-version-of-npm

Was this page helpful?
0 / 5 - 0 ratings