I am having trouble installing keystone.js on Linux. Not really sure exactly what the problem is as I am very new to Linux. Here's the output below when I try to install keystone using npm install -g generator-keystone
I solved some issues with the answers from this: npm throws error without sudo but still getting these errors:
npm ERR! Error: EACCES, symlink '../lib/node_modules/yo/cli.js'
npm ERR! { [Error: EACCES, symlink '../lib/node_modules/yo/cli.js']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '../lib/node_modules/yo/cli.js' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "generator-keystone"
npm ERR! cwd /home/emile
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path ../lib/node_modules/yo/cli.js
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '../lib/node_modules/yo/cli.js'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/emile/npm-debug.log
npm ERR! not ok code 0
Any ideas?
Thanks
This link solved this exact issue for me: https://groups.google.com/forum/#!topic/keystonejs/zZdSoz_sIn0
In short, the following spell solved the issue for me:
root@localhost:~# which nodejs
/usr/bin/nodejs
root@localhost:~# cd /usr/bin/
root@localhost:/usr/bin# ln -s nodejs node
Run it with sudo.
The line
Error: EACCES, mkdir '/usr/local/lib/node_modules'
Means NPM does not have sufficient permissions to create a new directory
The error log itself is telling you what to do.
Please try running this command again as root/Administrator.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.