stav/wgrep

Installation fails in WSL.

Tonda39 opened this issue · 4 comments

tonda@DESKTOP-AOFK8QT:~/VSB/DS/Projekt/wgrep$ npm install
(node:13612) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSo
cket]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)
(node:13612) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSo
cket]. Use emitter.setMaxListeners() to increase limit
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup '\\wsl.localhost\Ubuntu\home\tonda\VSB\DS\Projekt\wgrep\node_modules\@babel\generator',
npm WARN cleanup [Error: ENOTEMPTY: directory not empty, rmdir '\wsl.localhost\Ubuntu\home\tonda\VSB\DS\Projekt\wgr
ep\node_modules@babel\generator\node_modules@jridgewell'] {
npm WARN cleanup errno: -4051,
npm WARN cleanup code: 'ENOTEMPTY',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: '\\wsl.localhost\Ubuntu\home\tonda\VSB\DS\Projekt\wgrep\node_modules\@babel\gen
erator\node_modules\@jridgewell'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path \wsl.localhost\Ubuntu\home\tonda\VSB\DS\Projekt\wgrep\node_modules\puppeteer
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.js
npm ERR! '\wsl.localhost\Ubuntu\home\tonda\VSB\DS\Projekt\wgrep\node_modules\puppeteer'
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:1051
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'C:\Windows\install.js'
npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
npm ERR! at Module._load (node:internal/modules/cjs/loader:901:27)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
npm ERR! at node:internal/main/run_main_module:23:47 {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: []
npm ERR! }
npm ERR!
npm ERR! Node.js v20.9.0

npm ERR! A complete log of this run can be found in: C:\Users\tonda\AppData\Local\npm-cache_logs\2023-12-01T19_27_50_30
1Z-debug-0.log

The complete log:

2023-12-01T19_27_50_301Z-debug-0.log

Thanks for reporting the issue.

I updated the dependencies just now, pull the latest commit and try to install again.

Sorry for the late response.
I've pulled the latest commit and tried to install again but the issue persists.

tonda@DESKTOP-AOFK8QT:~/VSB/DS/Projekt/wgrep$ npm install
npm ERR! code 1
npm ERR! path \wsl.localhost\Ubuntu\home\tonda\VSB\DS\Projekt\wgrep\node_modules\puppeteer
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.mjs
npm ERR! '\wsl.localhost\Ubuntu\home\tonda\VSB\DS\Projekt\wgrep\node_modules\puppeteer'
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:1147
npm ERR! throw err;
npm ERR! ^
npm ERR!
npm ERR! Error: Cannot find module 'C:\Windows\install.mjs'
npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
npm ERR! at Module._load (node:internal/modules/cjs/loader:985:27)
npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:
135:12)
npm ERR! at node:internal/main/run_main_module:28:49 {
npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! requireStack: []
npm ERR! }
npm ERR!
npm ERR! Node.js v20.10.0

npm ERR! A complete log of this run can be found in: C:\Users\tonda\AppData\Local\npm-cache
_logs\2023-12-11T11_27_13_483Z-debug-0.log

2023-12-11T11_27_13_483Z-debug-0.log

stav commented
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node install.mjs
npm ERR! '\wsl.localhost\Ubuntu\home\tonda\VSB\DS\Projekt\wgrep\node_modules\puppeteer'
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.

@Tonda39 I found a few things around:

That's an error you'll get every time you start cmd.exe from WSL, unless your current directory is under one of your mounted drives (/mnt/c, /mnt/d, etc.)

Where do you have NodeJS installed? On the Linux partition?

Installing NodeJS on my WSL did the trick

Maybe you can try to create a virtual drive before installing:

PUSHD and POPD should help in your case.

Thanks for the help, I installed NodeJS in WSL and it works.