- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.8k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 10.xRelease 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
npm install appears to truncate its arguments after the first # character, thus not finding the correct file when the path contains a #.
Expected Behavior
The only characters that should cause trouble in unix systems in paths are control characters (in particular, NUL) and forward/backward slashes (as path components). Under windows, further restrictions on valid paths exist, but they shouldn't prevent npm from finding files on valid paths.
Steps To Reproduce
Encountered while building the package https://aur.archlinux.org/packages/nodejs-nativefier in /home/gesh/aur/9#deps/whatsapp-nativifier/nodejs-nativefier, problem vanished when building in /home/gesh/aur/whatsapp-nativifier/nodejs-nativefier.
Log attached
Context-agnostic instructions:
- Download eg http://registry.npmjs.org/nativefier/-/nativefier-52.0.0.tgzto~/0#broken/
- npm install ~/0#broken/*.tgz
- npm complains it can't find ~/0
- However, mv ~/0#broken ~/fixed
- npm install ~/fixed/*.tgz
- Everything works fine
Environment
- npm: 10.1.0
- Node.js: v20.6.1
- Linux telcontar 6.4.12-arch1-1 archive: committable offline dependency archive #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 x86_64 GNU/Linux
- npm config:
; "user" config from /home/gesh/.local/etc/npm/npmrc
cache = "/home/gesh/.local/var/cache/npm" 
init-module = "/home/gesh/.local/etc/npm/config/npm-init.js" 
prefix = "/home/gesh/.local" 
; "env" config from environment
userconfig = "/home/gesh/.local/etc/npm/npmrc" 
; node bin location = /usr/bin/node
; node version = v20.6.1
; npm local prefix = /home/gesh
; npm version = 10.1.0
; cwd = /home/gesh
; HOME = /home/gesh
; Run `npm config ls -l` to show all defaults.Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 10.xRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release