Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
mkdir '/tmp/#'
cd '/tmp/#'
npm pack
Could not read package.json: Error: ENOENT: no such file or directory, open '/tmp/package.json'
It doesn't matter how long dir name will be, if it contains shebang than npm pack tries to read package.json from parent dir.
Expected Behavior
All printable ascii symbols expect / should be valid for project dir.
Steps To Reproduce
No response
Environment
- npm: 10.8.1
- Node.js: v20.16.0
- OS Name: Ubuntu 24.04.1 LTS
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
It doesn't matter how long dir name will be, if it contains shebang than
npm packtries to readpackage.jsonfrom parent dir.Expected Behavior
All printable ascii symbols expect
/should be valid for project dir.Steps To Reproduce
No response
Environment