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

Dev Kit Can't Recognize NPM which installed by fnm #12

Closed
ZYUN-MSFT opened this issue Dec 4, 2024 · 2 comments
Closed

Dev Kit Can't Recognize NPM which installed by fnm #12

ZYUN-MSFT opened this issue Dec 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@ZYUN-MSFT
Copy link

ZYUN-MSFT commented Dec 4, 2024

Describe the bug

Dev Kit Can't Recognize the NPM command which is installed by fnm.

Details

On a totally new environment and install node.js with fnm:

fnm status

Check pre-requirements failed and create new add-in failed:

pre-requirements

create new

I guess this may related to the special method that fnm make the system link, or the special way VSCode read environment vars.

Notice

fnm is an Node.js official recommend way to install node.js (from Node.js official website):

image

@ZYUN-MSFT ZYUN-MSFT added the bug Something isn't working label Dec 4, 2024
@ZYUN-MSFT
Copy link
Author

Update some investigation:

  1. fnm MUST have to initialize the env var by fnm command, otherwise the node npm can't be found
  2. Initial script in Pwsh's profile don't affect Windows default new process
  3. Due to this design, fnm can live together with official system installed node.js, that means on no fnm command init profile's shell, the system default node.js will be used.
  4. Due to 3., this issue can be work around by manually install a system level official node.js (Already verified)

Due to above, I suggest not to fix this issue for now, since we can't cover every node.js version manager's every special behaviors.

@hermanwenhe hermanwenhe added the wontfix This will not be worked on label Dec 16, 2024
@hermanwenhe hermanwenhe pinned this issue Dec 16, 2024
@hermanwenhe hermanwenhe closed this as not planned Won't fix, can't repro, duplicate, stale Dec 16, 2024
@sixareen
Copy link

I just started trying to use this Kit on a clean install of Win 11 and this was the first of many errors/problems I have encountered so far. Why mention it? Because it's actually very difficult when you're starting even to work out what "manually install a system level official node.js" actually means. Starting from scratch, you don't seem to be able to install the MS Windows build tools without either going through chocalatey (i.e. I have to use the node/npm installer and it just seems to be a different version from the one that the Kit documentation link took me to; using npm directly to install the build tools doesn't seem to be possible until you've installed node/npm. Nasty loop. But the other suggested methods of installing the Windows Build Tools seem to require that I install a version of the full Visual Studio, whereas the entire point of using this Kit is just to use VS Code! Think perhaps Microsoft should at least document the more detailed steps involved in getting all the necessary components in place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants