← Back to issue list

npm-run does not respect source-subdir

View original Launchpad issue

Metadata

Project
snapcraft
Number
#1694642
Type
issue
State
open
Author
~saviq
Labels
sources
Created
2017-05-31 09:04:50.609105+00:00
Updated
2018-02-26 08:31:11.244242+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Given a part: my-part: # See 'snapcraft plugins' plugin: nodejs npm-run: [foo] source: . source-subdir: nodeapp And a tree: . ├── nodeapp │   └── package.json └── snap └── snapcraft.yaml npm tries to find package.json in the root: npm run foo npm ERR! Linux 4.10.0-21-generic npm ERR! argv "/tmp/nodejs-snap/parts/my-part/install/bin/node" "/tmp/nodejs-snap/parts/my-part/install/bin/npm" "run" "foo" npm ERR! node v6.10.2 npm ERR! npm v3.10.10 npm ERR! path /tmp/nodejs-snap/parts/my-part/src/package.json npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open '/tmp/nodejs-snap/parts/my-part/src/package.json' npm ERR! enoent ENOENT: no such file or directory, open '/tmp/nodejs-snap/parts/my-part/src/package.json' npm ERR! enoent This is most likely not a problem with npm itself npm ERR! enoent and is related to npm not being able to find a file. npm ERR! enoent npm ERR! Please include the following file with any support request: npm ERR! /tmp/nodejs-snap/parts/my-part/src/npm-debug.log Command '['/bin/sh', '/tmp/tmpri054knq', 'npm', 'run', 'foo']' returned non-zero exit status 254.

Evaluation history

No evaluation history available.