-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Starting with 19a8346, a simple npm exec foo fails with ENOENT if the prefix directory specified in npmrc doesn't exist:
$ npm exec foo
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path /home/cbay/.npm-packages/lib
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, lstat '/home/cbay/.npm-packages/lib'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
$ cat ~/.npmrc
prefix = /home/cbay/.npm-packages
$ ls /home/cbay/.npm-packages
ls: cannot access '/home/cbay/.npm-packages': No such file or directory
Expected Behavior
It used to work just fine until that commit:
$ npm exec foo
Need to install the following packages:
foo@0.0.7
Ok to proceed? (y)
Steps To Reproduce
No response
Environment
This was tested on Node.js 18.8.0 and 19.1.0. It worked fine on 18.7.0.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release