asdf-vm/asdf-nodejs

Could not determine Node.js install directory

開放

#271 建立於 2021年12月2日

 (1 則留言) (0 個反應) (0 位負責人)Shell (163 個分叉)github user discovery
WSLhelp wanted

倉庫指標

星標
 (987 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

After installing the latest version of nodejs with asdf install nodejs latest and then setting it as global with asdf global nodejs latest, when I type node, it works as expected, but if I use npm or npx, they give the errors:

npm: Error: EINVAL: invalid argument, uv_pipe_open Error: Cannot find module '\\wsl$\Ubuntu\node_modules\npm\bin\npm-cli.js'

npx: Error: EINVAL: invalid argument, uv_pipe_open.

And the last line when running either of these is Could not determine Node.js install directory.

I am using a WSL with Ubuntu downloaded from the Microsoft store.

貢獻者指南