mercredi 1 juillet 2015

npm install ember-cli fails on ubuntu trusty in vagrant virtualbox

I have not been able to successfully install ember-cli. I finally was able to run:

sudo npm install -g ember-cli

But when running:

user@host:~ ember new ember-app

I get:

/usr/bin/env: node: No such file or directory

I installed node.js from the repositories using sudo apt-get install nodejs and same with npm.

I have installed bower and tried to re-install npm. Here is the last error:

user@host:~ npm install -g ember-cli
npm http GET http://ift.tt/1Qsp0Yf
npm http 200 http://ift.tt/1Qsp0Yf
npm http GET http://ift.tt/1ALYMOL
npm http 200 http://ift.tt/1ALYMOL
npm ERR! Error: shasum check failed for /home/user/tmp/npm-14461-xfhNCJKF/1435776262780-0.6301117099355906/tmp.tgz
npm ERR! Expected: fefcd9fe7faf276a5a68c8bfcc92288c0f0678d5
npm ERR! Actual:   c120ca4196f11da6e51f9c8ebb273439dcfee615
npm ERR!     at /usr/lib/nodejs/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/lib/nodejs/sha/index.js:85:7)
npm ERR!     at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://ift.tt/wnQOXn;
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.13.0-55-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "ember-cli"
npm ERR! cwd /home/user
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/user/npm-debug.log
npm ERR! not ok code 0

For clarity, I am able to install other items using npm. Just not ember-cli.

UPDATE:

I am getting similar errors that I've received in previous executions of npm install -g ember-cli when run the following:

npm install -g latest-version

Received the following error:

npm http GET http://ift.tt/1pifSHE
npm http 304 http://ift.tt/1pifSHE
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/latest-version'
npm ERR!  { [Error: EACCES, mkdir '/usr/local/lib/node_modules/latest-version']
npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/usr/local/lib/node_modules/latest-version',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/latest-version',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack: 
npm ERR!    [ '/usr/lib/nodejs/fstream/lib/dir-writer.js:36:23',
npm ERR!      '/usr/lib/nodejs/mkdirp/index.js:37:53',
npm ERR!      'Object.oncomplete (fs.js:107:15)' ] }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Linux 3.13.0-55-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "--global" "latest-version"
npm ERR! cwd /home/user
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/latest-version
npm ERR! fstream_path /usr/local/lib/node_modules/latest-version
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/usr/local/lib/node_modules/latest-version'
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/user/npm-debug.log
npm ERR! not ok code 0




Aucun commentaire:

Enregistrer un commentaire