npm install --production failes

85 views
Skip to first unread message

beavma...@gmail.com

unread,
Mar 5, 2014, 7:36:37 PM3/5/14
to canvas-l...@googlegroups.com

trcc@canvas:/var/canvas$ npm install --production

> canva...@0.0.0 install /var/canvas
> ./node_modules/napa/bin/napa

sh: 1: ./node_modules/napa/bin/napa: not found

npm ERR! canva...@0.0.0 install: `./node_modules/napa/bin/napa`
npm ERR! `sh "-c" "./node_modules/napa/bin/napa"` failed with 127
npm ERR!
npm ERR! Failed at the canva...@0.0.0 install script.
npm ERR! This is most likely a problem with the canvas-lms package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ./node_modules/napa/bin/napa
npm ERR! You can get their info via:
npm ERR!     npm owner ls canvas-lms
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.2.0-59-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "--production"
npm ERR! cwd /var/canvas
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! code ELIFECYCLE
npm ERR! message canva...@0.0.0 install: `./node_modules/napa/bin/napa`
npm ERR! message `sh "-c" "./node_modules/napa/bin/napa"` failed with 127
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/canvas/npm-debug.log
npm not ok

npm-debug.log

Ryan Marsh

unread,
Mar 7, 2014, 10:13:23 AM3/7/14
to canvas-l...@googlegroups.com
Hi Tom,

I got the same thing when I did npm install... turned out to be a permissions problem. Try this:
cd /var/canvas
sudo mkdir node_modules
sudo chown canvasuser node_modules
sudo su canvasuser
npm install
--production
exit

Ryan Marsh

unread,
Mar 7, 2014, 10:18:14 AM3/7/14
to canvas-l...@googlegroups.com
I forgot to mention, the version of npm that comes packaged with Precise is pretty old and may cause problems. You might want to upgrade node to a more recent version. I used ppa for this (you can also use nvm):
sudo apt-get autoremove --purge nodejs npm
sudo apt
-add-repository ppa:chris-lea/node.js
sudo apt
-get update
sudo apt
-get install nodejs

This package has npm included in it and it worked great for me.

Ryan Marsh

unread,
Mar 7, 2014, 10:19:43 AM3/7/14
to canvas-l...@googlegroups.com
And just read another thread that says don't use the --production flag. The install instructions have been updated to include this as well P
Reply all
Reply to author
Forward
0 new messages