Skip to content

Nodejs is installed in WSL. How to set up the node path ? Thanks #397

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

Open
medmin opened this issue Aug 22, 2019 · 8 comments
Open

Nodejs is installed in WSL. How to set up the node path ? Thanks #397

medmin opened this issue Aug 22, 2019 · 8 comments
Labels
help wanted Extra attention is needed

Comments

@medmin
Copy link

medmin commented Aug 22, 2019

Before you submit an question we recommend you to check out the DOCUMENT first.

You can also find more information in:

💬 Questions and Help

Please outline the questions.

Hi,

First thing first, thanks for the awesome plugin!

According to the documentation, I need to " Specify the Node.js executable path. for example, C:\Program Files\nodejs\node.exe".

However, I install nodejs in my WSL, Ubuntu 16.04 LTS, to be precise. So, there is not a node path for "node.exe".

But according to the solved issue #46 , your plugin does support WSL.

So, I am confused. How do I use this awesome pluin while I am using WSL and have installed Nodejs in WSL? Thanks.

@jdneo
Copy link
Member

jdneo commented Aug 23, 2019

Just reset to the setting to the default value, which is node.

Since I believe in the WSL environment, the node executable is in your PATH env already

@medmin
Copy link
Author

medmin commented Aug 23, 2019

I guess it may be a path problem:

I've got this:

Error: Cannot find module '/mnt/c/Users/Yumin/AppData/Local/Programs/Microsoft VS Code/\mnt\c\Users\Yumin\.vscode\extensions\shengchen.vscode-leetcode-0.15.2\node_modules\vsc-leetcode-cli\bin\leetcode'

This is an obvious wrong path to look for the leetcode command, which has been installed globally.

So, any configuration to override this path ?

@jdneo
Copy link
Member

jdneo commented Aug 23, 2019

Can you provide your extension settings?

@medmin
Copy link
Author

medmin commented Aug 26, 2019

  "leetcode.useWsl": true,
  "leetcode.nodePath": "node",
  "leetcode.defaultLanguage": "javascript",
  "leetcode.showLocked": true,
  "leetcode.showCommentDescription": true,
  "leetcode.outputFolder": "/mnt/d/leetcode",
  "leetcode.workspaceFolder": "/mnt/d/leetcode",

@jdneo
Copy link
Member

jdneo commented Aug 27, 2019

What if set the "leetcode.outputFolder" to empty?

@medmin
Copy link
Author

medmin commented Aug 28, 2019

Still the same error. Weird.

It's the path issue for sure. I guess it is either a minor bug, or a line of configuration.

Is there any way for me to debug it in my local dev enviroment? Thanks.

@jdneo
Copy link
Member

jdneo commented Sep 1, 2019

@medmin It would be great if you would like to offer some help for this issue. Debugging the extension is very simple, just:

  • clone the repo
  • run npm install to install the dependencies
  • Open the repo in VS Code
  • Hit F5 to start a debug session.

That's it.

@jdneo jdneo added the help wanted Extra attention is needed label Sep 1, 2019
@jdneo
Copy link
Member

jdneo commented Feb 23, 2020

@medmin The new release contains a fix of the WSL path issue. Could you have a try to see if the problem solved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants