Page MenuHomePhabricator

Unable to run npm start on Vagrant under windows in shared dir
Closed, ResolvedPublic

Description

Cloning service-template-node into home dir in vagrant and doing npm install && npm start works fine, but doing the same in vagrant's /vagrant dir that has been mapped to the windows host's drive and doing npm install --no-bin-links && npm start gives this error.

I tracked it down to using the "--no-bin-links" flag - seems like the service-running fails with that option.

vagrant@mediawiki-vagrant:/vagrant/service-template-node$ npm start

> service-template-node@0.0.0 start /vagrant/service-template-node
> service-runner

sh: 1: service-runner: not found

npm ERR! service-template-node@0.0.0 start: `service-runner`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the service-template-node@0.0.0 start script.
npm ERR! This is most likely a problem with the service-template-node package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     service-runner
npm ERR! You can get their info via:
npm ERR!     npm owner ls service-template-node
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.13.0-30-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! cwd /vagrant/service-template-node
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /vagrant/service-template-node/npm-debug.log
npm ERR! not ok code 0

Event Timeline

Yurik raised the priority of this task from to Needs Triage.
Yurik updated the task description. (Show Details)
Yurik added subscribers: Yurik, GWicke, mobrovac.
Yurik added a project: service-runner.
Yurik set Security to None.

Log from npm-debug.log

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@1.4.28
3 info using node@v0.10.36
4 verbose node symlink /usr/bin/node
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart service-template-node@0.0.0
7 info start service-template-node@0.0.0
8 verbose unsafe-perm in lifecycle true
9 info service-template-node@0.0.0 Failed to exec start script
10 error service-template-node@0.0.0 start: `service-runner`
10 error Exit status 127
11 error Failed at the service-template-node@0.0.0 start script.
11 error This is most likely a problem with the service-template-node package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error     service-runner
11 error You can get their info via:
11 error     npm owner ls service-template-node
11 error There is likely additional logging output above.
12 error System Linux 3.13.0-30-generic
13 error command "/usr/bin/node" "/usr/bin/npm" "start"
14 error cwd /home/vagrant/service-template-node
15 error node -v v0.10.36
16 error npm -v 1.4.28
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]
~

Background:

  • --no-bin-links is needed because this is an install in vagrant on a shared windows fs that doesn't support symlinks when not running as admin
  • Directly calling service-runner via node index or node node_modules/service-runner/service-runner works. Only npm start does not.

From IRC: node index and node node_modules/service-runner/service-runner work ok even when npm installed with --no-bin-links flag.

In-flight collision, but all on board are confirmed safe.

mobrovac claimed this task.