I have an EC2 instance that successfully has node and mongo installed on it (I've tested both). I'm trying to install KeystoneJS now, but it's throwing errors. Not really sure where I'm going wrong here. Everything works fine locally, I'm assuming it's something with how my EC2 is configured.
npm install -g generator-keystone
results in
npm ERR! tar.unpack untar error /home/ec2-user/.npm/generator-keystone/0.3.7/package.tgz
npm ERR! Linux 3.14.35-28.38.amzn1.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "generator-keystone"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path /usr/local/lib/node_modules/generator-keystone
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/generator-keystone'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/generator-keystone']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/generator-keystone',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/generator-keystone',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:95:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ec2-user/npm-debug.log
sudo npm install -g generator-keystone
results in
sudo: npm: command not found