npm ERR! This is most likely a problem with the canvas-lms package

2,395 views
Skip to first unread message

Fred D.

unread,
Mar 6, 2014, 1:53:23 PM3/6/14
to canvas-l...@googlegroups.com
File Generation

Canvas needs to build a number of assets before it will work correctly. You will need to run:

sysadmin@appserver:/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.11.0-18-generic
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

Fred D.

unread,
Mar 6, 2014, 2:02:48 PM3/6/14
to canvas-l...@googlegroups.com, funact...@gmail.com
npm install --unsafe-perm

npm ERR! Error: failed to fetch from registry: loom
npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR!     at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:412:12)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1261:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR! You may report this log at:
npm ERR! or use
npm ERR!     reportbug --attach /var/canvas/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.11.0-18-generic
npm ERR! command "node" "/usr/bin/npm" "install" "--unsafe-perm"
npm ERR! cwd /var/canvas
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: loom

Graham Ballantyne

unread,
Mar 6, 2014, 2:07:51 PM3/6/14
to canvas-l...@googlegroups.com, funact...@gmail.com
Your version of nodejs is very, very old (v0.6.12, current is 0.10.26 and 0.12 is just around the corner). Try upgrading it. I'd either install the linux binary from nodejs.org, or use something like `nvm` or `n` to manage node versions.

– gnb


--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Fred D.

unread,
Mar 6, 2014, 2:15:07 PM3/6/14
to canvas-l...@googlegroups.com, funact...@gmail.com
Updated note but now I get working directory error...

/var/canvas# node -v
v0.10.26

/var/canvas# npm install --production
npm WARN cannot run in wd canva...@0.0.0 ./node_modules/napa/bin/napa (wd=/var/canvas)

Fred D.

unread,
Mar 6, 2014, 2:22:15 PM3/6/14
to canvas-l...@googlegroups.com, funact...@gmail.com
I wonder if I can skip that step. Bundle rake seems to work fine (without that first step).
sysadmin@appserver:/var/canvas$ npm install --production
sysadmin@appserver:/var/canvas$ bundle exec rake canvas:compile_assets

Fred. D.

unread,
Mar 6, 2014, 2:34:30 PM3/6/14
to canvas-l...@googlegroups.com, funact...@gmail.com
I was wrong. Rake failed too. I'm back to reinstalling everything (2nd time).

Fred D.

unread,
Mar 6, 2014, 4:21:22 PM3/6/14
to canvas-l...@googlegroups.com
I'm stuck again. :-(

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! Exit status 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! System Linux 3.11.0-18-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "--production"
npm ERR! cwd /var/canvas
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/canvas/npm-debug.log
npm ERR! not ok code 0

cat /var/canvas/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '--production' ]
2 info using n...@1.4.3
3 info using no...@v0.10.26
4 verbose node symlink /usr/bin/node
5 verbose readDependencies using package.json deps
6 verbose install where, deps [ '/var/canvas', [] ]
7 info preinstall canva...@0.0.0
8 verbose readDependencies using package.json deps
9 silly resolved []
10 info build /var/canvas
11 verbose linkStuff [ false, false, false, '/var' ]
12 info linkStuff canva...@0.0.0
13 verbose linkBins canva...@0.0.0
14 verbose linkMans canva...@0.0.0
15 verbose rebuildBundles canva...@0.0.0
16 info install canva...@0.0.0
17 verbose unsafe-perm in lifecycle true
18 info canva...@0.0.0 Failed to exec install script
19 error canva...@0.0.0 install: `./node_modules/napa/bin/napa`
19 error Exit status 127
20 error Failed at the canva...@0.0.0 install script.
20 error This is most likely a problem with the canvas-lms package,
20 error not with npm itself.
20 error Tell the author that this fails on your system:
20 error     ./node_modules/napa/bin/napa
20 error You can get their info via:
20 error     npm owner ls canvas-lms
20 error There is likely additional logging output above.
21 error System Linux 3.11.0-18-generic
22 error command "/usr/bin/node" "/usr/bin/npm" "install" "--production"
23 error cwd /var/canvas
24 error node -v v0.10.26
25 error npm -v 1.4.3
26 error code ELIFECYCLE
27 verbose exit [ 1, true ]

Fred D.

unread,
Mar 6, 2014, 4:38:42 PM3/6/14
to canvas-l...@googlegroups.com, funact...@gmail.com
Installed napa. npm install --production completes. bundle exec rake canvas:compile_assets now gives me the following error message:

--> Optimizing JavaScript [r.js]
** Invoke js:build (first_time)
** Execute js:build
--> Optimizing canvas-lms
rake aborted!
Error running js:build:

module.js:340
    throw err;
          ^
Error: Cannot find module '/var/canvas/node_modules/rjs-old/r.js-1.0.8/dist/r.js'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

ABORTING/var/canvas/lib/tasks/js.rake:218:in `block (3 levels) in <top (required)>'
/usr/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
/var/canvas/lib/tasks/js.rake:216:in `block (2 levels) in <top (required)>'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
/var/canvas/lib/tasks/canvas.rake:122:in `block (2 levels) in <top (required)>'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/var/canvas/vendor/bundle/ruby/1.9.1/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
/var/canvas/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
/var/canvas/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'
Tasks: TOP => js:build

Andrew Matthews

unread,
Mar 6, 2014, 8:56:33 PM3/6/14
to canvas-l...@googlegroups.com, funact...@gmail.com
I'm not sure what the '--production' piece does, but just running 'npm install' from the Canvas application root took care of things for me.  It installed the missing module referenced in your error (along with many more).  Maybe give it another shot.

Graham Ballantyne

unread,
Mar 6, 2014, 9:29:03 PM3/6/14
to canvas-l...@googlegroups.com, funact...@gmail.com
The --production flag to `npm install` tells npm to not install modules listed in the devDependencies section of package.json. Instructure’s package.json file (https://github.com/instructure/canvas-lms/blob/stable/package.json) lists all of its dependencies inside the devDependencies section, and there is no dependencies section, so nothing will be installed when using the --production flag. 

The --production flag is used when deploying to production servers, etc, where you don't need to bother installing your development dependencies, like test frameworks & documentation generators.

I edited the Production Start page to remove the --production flag. I would argue that package.json file needs to be changed to use `dependencies` rather than `devDependencies` as these packages are required for the application to run, and not for development.

--
Graham Ballantyne
IT Services
Simon Fraser University

On Thu, Mar 6, 2014 at 5:56 PM, Andrew Matthews <apmatt...@gmail.com> wrote:
I'm not sure what the '--production' piece does, but just running 'npm install' from the Canvas application root took care of things for me.  It installed the missing module referenced in your error (along with many more).  Maybe give it another shot.

--

---
You received this message because you are subscribed to the Google Groups "Canvas LMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to canvas-lms-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fred D.

unread,
Mar 7, 2014, 9:16:43 AM3/7/14
to canvas-l...@googlegroups.com, funact...@gmail.com
Thank you both. That was it -- removing production flag resolved the issues for me. Yay!

brains...@gmail.com

unread,
Mar 16, 2014, 11:36:36 AM3/16/14
to canvas-l...@googlegroups.com, funact...@gmail.com
Hi all,

I have gone through this nodejs and npm issue with this message : "npm WARN cannot run in wd canva...@0.0.0 ./node_modules/napa/bin/napa (wd=/var/canvas)".

Current nodejs version: 0.8.15
Current npm version: 1.1.66
- sudo npm install or npm install - still have the same error...
I have also installed nodejs latest version...still the same error...

Now I'm thinking to move from Ubuntu 12.04 LTS to 13 with latest nodejs version (including npm).

Any idea ? Thanks

B.

Graham Ballantyne

unread,
Mar 16, 2014, 11:43:09 AM3/16/14
to canvas-l...@googlegroups.com, funact...@gmail.com
Try upgrading to a more recent version on Node. I think 0.10.26 is current. 

Graham. 

-- 
Fingers are too fat
Grease prints adorn the screen
I'm on a phone

brains...@gmail.com

unread,
Mar 16, 2014, 12:10:12 PM3/16/14
to canvas-l...@googlegroups.com, funact...@gmail.com
Hi Graham,

I'm upgrading to Ubuntu 13.10 LTS and will install the latest version of nodejs. Will update the result here in few.
Thanks,

B.

brains...@gmail.com

unread,
Mar 16, 2014, 1:44:13 PM3/16/14
to canvas-l...@googlegroups.com, funact...@gmail.com, brains...@gmail.com
Hi Graham,

I have updated to 0.10.26 and still have this error message: [npm WARN cannot run in wd canva...@0.0.0 ./node_modules/napa/bin/napa (wd=/var/canvas)]
It's like an issue with napa (root right level) and rjs-old (files are missing)...

B.

brains...@gmail.com

unread,
Mar 18, 2014, 7:37:39 PM3/18/14
to canvas-l...@googlegroups.com, funact...@gmail.com
Hi,

Here a fix after 3 days trying to fix this issue...

sudo npm install --unsafe-perm

And it works like a charm...

B.

b0rgBart

unread,
Jun 23, 2015, 2:22:40 AM6/23/15
to canvas-l...@googlegroups.com, brains...@gmail.com, funact...@gmail.com
Hello - I am trying to install Canvas LMS on my local Mac for the first time, using the Get Started script.

The first time I had trouble installing NPM - I saw this message thread and tried "sudo npm install --unsafe-perm",
but after completing the install I found than none of my 'public stylesheets' were working, so I went thru the whole
installation process again, and now I am still having trouble installing NPM - even with the '--unsafe-perm'.

Here are the errors:

> node-gyp rebuild


  CXX(target) Release/obj.target/contextify/src/contextify.o

  SOLINK_MODULE(target) Release/contextify.node

ld: library not found for -lgcc_s.10.5

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [Release/contextify.node] Error 1

gyp ERR! build error 

gyp ERR! stack Error: `make` failed with exit code: 2

gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)

gyp ERR! stack     at ChildProcess.emit (events.js:110:17)

gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1067:12)

gyp ERR! System Darwin 14.3.0


Can anyone point me in the right direction??

Thanks!


Nick Kokkos

unread,
Jun 23, 2015, 11:03:10 AM6/23/15
to canvas-l...@googlegroups.com, brains...@gmail.com, funact...@gmail.com
Your stack trace shows->


ld: library not found for -lgcc_s.10.5


You are missing this library. If you were on Ubuntu , that would be easy to fix but on mac os I really have no experience to help you

b0rgBart

unread,
Jun 23, 2015, 11:12:16 AM6/23/15
to canvas-l...@googlegroups.com, brains...@gmail.com, funact...@gmail.com
Thanks Nick.

I tried it again this morning - and installed the assets separately from the main script, using this:

bundle exec rake canvas:compile_assets


And that seems to have worked.

Reply all
Reply to author
Forward
0 new messages