I need help with npm

I"ll be glad if someone can help me out.

I’ve been having this challenge lately running running visual studio code from the command line. I am not sure of what is happening.
The terminal don’t open for new command until i close vscode editor

. “The terminal remain this way checking for update…” What could be the problem and how can i resolve this?

You know when using VSCode you have integrated terminal which you can change with gitbash? Anyroad, i’m guessin’ you don’t run VSCode from command line instead run terminal inside VSCode, am i right? Do you think of this:


terminal is the thing way down.

I run it from command line on windows

Hi, if you are using visual-studio-code-cli notice that the last update was 4 years ago. It might not be up to date anymore.

ok, you suggest i run the command above?

Ok and by that you control all of you dependencies, packages etc…? If you want to start React project just go its directorium within terminal(you already here as seen in image) and type npm start and press enter.

It’s not NPM, it’s just a terminal, ie you are opening VSCode from a terminal, it has nothing to do with NPM.

Anyway, you’ve got the path for code pointing to the actual electron app rather than the command-line utility provided with VSCode. The terminal is just showing the terminal output of the VSCode program, and is working fine. You could just open another terminal and work from that, it’ll be fine (if you kill the original one it’ll kill the program), however this is pointless: the path for code should be pointing to code.cmd, not code.exe, and that should fix it.

You should just press ctrl + shift + p in VSCode and search for “install shell command”, execute that and it should overwrite the incorrect path you currently have

Edit: @codename11 OP is opening VSCode from the command line by [attempting to] use VSCode’s own command-line utility. They don’t have VSCode open at the point so cannot use the terminal emulator built into the program.

1 Like

Ok, it’s just misunderstanding.

Ok then, I hope it will work, Thank you for the help

@DanCouper What can I do from here? it seems “shell command” is missing.

Once I’m in front of a computer I’ll check, maybe the name of the command in the VSCode menu has changed? There’s definitely an a option you select which just sets up your PATH variables so code in the terminal points at the right thing

1 Like

You can check the path in your environment variables.
From https://code.visualstudio.com/docs/editor/command-line:

Windows and Linux installations should add the VS Code binaries location to your system path. If this isn’t the case, you can manually add the location to the Path environment variable ( $PATH on Linux). For example, on Windows, VS Code is installed under AppData\Local\Programs\Microsoft VS Code\bin . To review platform specific setup instructions, see Setup.

To get to the environment variables:

  • open the folder explorer
  • right click on “This PC” on the left and chose “poperties”
  • on the left click on “Advanced system settings”
  • in the “Advanced” tab, click on the “Environment variables” button (last one)
  • In the first half of the window, double click “Path”
    Here you should find the entry relative to the VSCode editor.
    I’m attaching a picture of what I see on my pc, but beware that during the installation process I changed the destination directory, so yours will probably be different.
    Anyway, make sure that your path ends with “Microsoft VS Code\bin”.
    Also I’m sorry if some of the entries I’ve written do not match perfectly with what you can find on your system. Mine is in Italian and I tried to translated as best as I could.
2 Likes

@simonebogni It worked, I am grateful… thank you! I worked all day to resolve this I became so confuse :joy::joy::joy::rofl: