-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Current Behavior:
npm -C ./dir exec foo fails with ENOENT, even if ./dir contains package.json.
Expected Behavior:
npm -C ./dir exec foo runs foo command in ./dir directory.
Steps To Reproduce:
$ cd $(mktemp -d)
$ mkdir dir
$ cd dir
$ npm i cowsay
$ npm exec cowsay a # <- Success
$ cd ..
$ npm -C ./dir ls # <- Success
$ npm -C ./dir exec cowsay a # <- ERROR
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /tmp/tmp.PSJSuTrxHx/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/tmp/tmp.PSJSuTrxHx/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/tmp.vynlwg6kj4/.npm/_logs/2020-10-29T07_45_41_525Z-debug.log
Environment:
- OS: Manjaro Linux(Linux acm-manjaro 4.19.147-1-MANJARO SMP Wed Sep 23 18:00:56 UTC 2020 x86_64 GNU/Linux)
- Node: 15.0.1
- npm: 7.0.6
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release