Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running npm command within Visual Studio Code

Is there anyway of executing the npm command within Visual Studio Code (using f1 into >) on Windows(10) to install packages to my folder I'm working in?

I have npm installed and I keep having to install npm packages from cmd

like image 835
garfbradaz Avatar asked Feb 22 '16 21:02

garfbradaz


People also ask

Why npm is not working in VS Code?

If you've installed npm globally on your system, and you're getting the error message from VSCode terminal, it might be the terminal that didn't update the VSCode application. Just close all VSCode windows and reopen the application again to reload all of its module – that should be enough to resolve the issue.


1 Answers

Install

  • Ctrl+P, write ext install npm script runner
  • Restart VS Code

Use (two ways)

  • Ctrl+R Shift+R
  • Ctrl+P, write >npm, select run script, select the desired task

Update: Since version 1.3 Visual Studio Code has integrated terminal. To open it, use any of these methods:

  • Use the Ctrl+` keyboard shortcut.
  • Use the View | Toggle Integrated Terminal menu command.
  • From the Command Palette (Ctrl+Shift+P), use the View:Toggle Integrated Terminal command.
like image 129
Javiere Avatar answered Sep 21 '22 09:09

Javiere