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

npm install, post install of hugo package blows up on install on wsl #164

Open
wsor4035 opened this issue Feb 1, 2025 · 2 comments
Open
Assignees

Comments

@wsor4035
Copy link
Collaborator

wsor4035 commented Feb 1, 2025

see title - tested on wsl, havent checked elsewhere
works on actual linux

@mark-wiemer
Copy link
Contributor

Can you share the err message? What distro is installed in WSL? I'm assuming this is WSL2?

@mark-wiemer
Copy link
Contributor

Per the err msg shared privately, looks like this is the culprit:

...
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path \\wsl.localhost\Ubuntu\home\user\redacted\dev.luanti.org\node_modules\hugo-extended
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node postinstall.js
npm ERR! '\\wsl.localhost\Ubuntu\home\user\redacted\dev.luanti.org\node_modules\hugo-extended'
npm ERR! CMD.EXE was started with the above path as the current directory.
npm ERR! UNC paths are not supported.  Defaulting to Windows directory.
npm ERR! node:internal/modules/cjs/loader:1078
npm ERR!   throw err;
npm ERR!   ^
npm ERR!
npm ERR! Error: Cannot find module 'C:\Windows\postinstall.js'
...

Specifically

npm ERR! UNC paths are not supported.  Defaulting to Windows directory.

Others have seen similar issues:

  1. https://stackoverflow.com/questions/75039437/not-able-to-use-a-npm-start-from-wsl-unc-paths-are-not-supported
  2. https://stackoverflow.com/questions/74000168/running-an-express-server-from-wsl-unc-paths-are-not-supported

I'd close as out-of-scope. If folks want to use WSL, they're responsible for configuring it appropriately. This issue is now a good enough starting guide, the err msg itself seems "googlable" into the future as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants