Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] npm breaks on Windows when running off a UNC path #3349

Closed
1 task done
Stanzilla opened this issue Jun 2, 2021 · 2 comments
Closed
1 task done

[BUG] npm breaks on Windows when running off a UNC path #3349

Stanzilla opened this issue Jun 2, 2021 · 2 comments
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release

Comments

@Stanzilla
Copy link

Stanzilla commented Jun 2, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

PS Microsoft.PowerShell.Core\FileSystem::\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion> npm install
'\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
npm WARN saveError ENOENT: no such file or directory, open 'C:\Windows\package.json'
npm WARN saveError EPERM: operation not permitted, open 'C:\Windows\package-lock.json.415733530'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\package.json'

See #1189 for more info

Expected Behavior

install works

Steps To Reproduce

  1. npm install

Same as:

Environment

  • OS: Windows 10
  • Node: v16
  • npm: v7
@Stanzilla Stanzilla added Bug thing that needs fixing Needs Triage needs review for next steps Release 7.x work is associated with a specific npm 7 release labels Jun 2, 2021
@ruyadorno
Copy link
Contributor

hi @Stanzilla thanks for bringing it to our attention.

Can you please open a new issue providing more info about the current environment, how exactly do you setup that Ubuntu WSL, how did you installed Node.js and npm. Also when you run an npm command can you use a more verbose logllevel. e.g: npm install --loglevel=silly. All that can be helpful for us to track down what might be happening in this case.

I'm going to close this issue since it's been stalled for a long time and haven't got any more traction but like I said, feel free to create a new one with more info in case you're able to still reproduce it using the current version of the npm cli (npm @8.5.2 at the time of writing).

@ruyadorno ruyadorno removed the Needs Triage needs review for next steps label Mar 2, 2022
@Stanzilla
Copy link
Author

@ruyadorno Hey there! I just updated npm to 8.5.2 and ran npm install --loglevel=silly which resulted in this:

npm verb stack Error: EISDIR: illegal operation on a directory, lstat '\\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion\node_modules\.bin\apollo-pbjs'
npm verb cwd \\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion
npm verb Windows_NT 10.0.22000
npm verb argv "C:\\Users\\Stan\\scoop\\apps\\nodejs\\current\\node.exe" "C:\\Users\\Stan\\scoop\\apps\\nodejs\\current\\node_modules\\npm\\bin\\npm-cli.js" "install" "--loglevel=silly"
npm verb node v17.6.0
npm verb npm  v8.5.2
npm ERR! code EISDIR
npm ERR! syscall lstat
npm ERR! path \\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion\node_modules\.bin\apollo-pbjs
npm ERR! errno -4068
npm ERR! EISDIR: illegal operation on a directory, lstat '\\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion\node_modules\.bin\apollo-pbjs'
npm verb exit -4068
npm timing npm Completed in 23758ms

Afterwards I nuked node_modules and did it again and it failed here:

5937 verbose cwd \\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion
5938 verbose Windows_NT 10.0.22000
5939 verbose argv "C:\\Users\\Stan\\scoop\\apps\\nodejs\\current\\node.exe" "C:\\Users\\Stan\\scoop\\apps\\nodejs\\current\\node_modules\\npm\\bin\\npm-cli.js" "install" "--loglevel=silly"
5940 verbose node v17.6.0
5941 verbose npm  v8.5.2
5942 error code 1
5943 error path \\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion\node_modules\@apollo\protobufjs
5944 error command failed
5945 error command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/postinstall
5946 error '\\wsl$\Ubuntu\home\stan\projects\personal\WeakAurasCompanion\node_modules\@apollo\protobufjs'
5946 error CMD.EXE was started with the above path as the current directory.
5946 error UNC paths are not supported.  Defaulting to Windows directory.
5946 error node:internal/modules/cjs/loader:936
5946 error   throw err;
5946 error   ^
5946 error
5946 error Error: Cannot find module 'C:\Windows\scripts\postinstall'
5946 error     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
5946 error     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
5946 error     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
5946 error     at node:internal/main/run_main_module:17:47 {
5946 error   code: 'MODULE_NOT_FOUND',
5946 error   requireStack: []
5946 error }
5946 error
5946 error Node.js v17.6.0
5947 verbose exit 1

Everything else is pretty much the same, so not sure if a new issue would help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

No branches or pull requests

2 participants