asdf-nodejs icon indicating copy to clipboard operation
asdf-nodejs copied to clipboard

Could not determine Node.js install directory

Open KrishGarg opened this issue 4 years ago • 1 comments

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.

KrishGarg avatar Dec 02 '21 21:12 KrishGarg

Can you check if is related to Microsoft/WSL#2370? We don't actively support WSL currently so it's kinda a try and error for us.

Are you having this error only with node.js or with other asdf-plugins as well?

augustobmoura avatar Dec 02 '21 23:12 augustobmoura