-
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 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 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
When node is installed with hermit, npx does not work:
npm ERR! code ENOENT
npm ERR! syscall lstat
npm ERR! path /Users/knpwrs/Downloads/hermit-npx-bug/.hermit/node/lib
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, lstat '/Users/knpwrs/Downloads/hermit-npx-bug/.hermit/node/lib'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Creating the .hermit/node/lib directory via mkdir -p .hermit/node/lib appears to fix this issue, even though the directory doesn't contain anything.
See https://github.com/cashapp/hermit-packages/issues/309, the hermit maintainers believe this is a bug with npx.
Expected Behavior
npx should work without needing an empty lib directory to exist.
Steps To Reproduce
- Install hermit
mkdir hermit-npx-bug && cd hermit-npx-bughermit init. ./bin/activate-hermithermit install nodewhich npx(this will verify the hermit-installednpxis being used)npx rimraf --help(this will fail)mkdir -p .hermit/node/libnpx rimraf --help(this works now!)
Environment
- npm: 9.2.0
- Node.js: 19.4.0
- OS Name: macOS Ventura 13.1
- System Model Name: Macbook Pro
- npm config:
; "user" config from /Users/knpwrs/.npmrc
//registry.npmjs.org/:_authToken = (protected)
; "env" config from environment
cache = "/Users/knpwrs/Downloads/hermit-npx-bug/.hermit/node/cache"
prefix = "/Users/knpwrs/Downloads/hermit-npx-bug/.hermit/node"
; node bin location = /Users/knpwrs/Library/Caches/hermit/pkg/node-19.9.0/bin/node
; node version = v19.9.0
; npm local prefix = /Users/knpwrs/Downloads
; npm version = 9.6.3
; cwd = /Users/knpwrs/Downloads/hermit-npx-bug
; HOME = /Users/knpwrs
; Run `npm config ls -l` to show all defaults.Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release