Sunday, 21 December 2014

errors of install yeoman generator and fixings

1, I was trying to install angular-fullstack by:
    npm install -g generator-angular-fullstack
    but i got this issue:

npm http GET https://registry.npmjs.org/amdefine
npm http 304 https://registry.npmjs.org/amdefine
npm ERR! peerinvalid The package yo does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer generator-angular@0.10.0 wants yo@>=1.0.0
npm ERR! peerinvalid Peer generator-angular-fullstack@2.0.13 wants yo@>=1.2.0
npm ERR! peerinvalid Peer generator-karma@0.8.3 wants yo@>=1.0.0

npm ERR! System Darwin 14.0.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "generator-angular-fullstack"
npm ERR! cwd /Users/Peter/temp/angular-fullstack-test
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/Peter/temp/angular-fullstack-test/npm-debug.log
npm ERR! not ok code 0


It looks like yoeman's version is too old.

2. update yo by:
   
     sudo npm update -g yo

I got the same error.

3. I tried to clean npm's cache by:
  npm cache clean

   but no help

4. I tried to update npm,  but I failed, and I lost my npm. I got this error:


npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/npm/.npmignore'
npm ERR! error rolling back  npm@2.1.14 { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm/.npmignore']
npm ERR! error rolling back   errno: 3,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   path: '/usr/local/lib/node_modules/npm/.npmignore' }
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/npm/.npmignore'
npm ERR!  { [Error: EACCES, unlink '/usr/local/lib/node_modules/npm/.npmignore']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/npm/.npmignore' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 14.0.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g" "npm"
npm ERR! cwd /Users/Peter/temp/angular-fullstack-test
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! path /usr/local/lib/node_modules/npm/.npmignore
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/npm/.npmignore'
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!  { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 14.0.0
npm ERR! command "node" "/usr/local/bin/npm" "update" "-g" "npm"
npm ERR! cwd /Users/Peter/temp/angular-fullstack-test
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.24
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/Peter/temp/angular-fullstack-test/npm-debug.log
npm ERR! not ok code 0
Peter-2:angular-fullstack-test Peter$ sudo npm update -g npm
sudo: npm: command not found
Peter-2:angular-fullstack-test Peter$ sudo npm update -g npm

sudo: npm: command not found



 and I cannot run npm:


sudo: npm: command not found


5, I have to reinstall node .

Note:


you may still have issues for updating npm after node reinstalled

1
2
3
4
5
6
7
8
9
10
11
sodu npm install npm -g 

Above is the command to upgrade your npm, if you still have issue, please follow my another post for solving it:

http://baiduhix.blogspot.co.uk/2015/01/update-yeoman-update-npm.html

Be aware that: you can reinstall Nodejs as many time as you want without any problems.


6, then all back to normal. then reinstall the fullstack generator.



If you still have problem please let me know.

Thanks,
Peter

No comments:

Post a comment