Skip to main content

All Questions

0 votes
0 answers
205 views

Is there a UI in VSCode for adding npm scripts directly to launch.json?

I am working on a Node.js project in Visual Studio Code. I noticed that when you open the package.json file, there's a debug button above the scripts property. When clicked, it allows me to select and ...
enoeht's user avatar
  • 493
0 votes
1 answer
63 views

VS Code: NPM scripts keeps loading when run is pressed

At the side panel on NPM Scripts. If I press run; the script keeps loading and does nothing. See the images below: If I run the script in the terminal manually it works. I don't know how to fix this, ...
Mo D Genesis's user avatar
  • 6,239
1 vote
1 answer
468 views

How do I run an npm script directly in VS code terminal

I am trying to follow this MS tutorial. So I install the CLI from the VS code terminal: npm install @azure/static-web-apps-cli Works. But following the instructions using "swa init" in the ...
noontz's user avatar
  • 2,017
3 votes
0 answers
291 views

How to exclude other package.json from VSCode npm script scan

In VSCode, the "NPM SCRIPTS" panel shows the root package.json scripts as expected and desired, however it also shows scripts from a package.json in a hidden .cache folder. Other SO answers ...
Kalnode's user avatar
  • 11.5k
2 votes
1 answer
5k views

Debugging in VSCode with a npm script

In my package.json I have some scripts defined that look like this: "scripts": { "build": "tsc -p tsconfig.json", "run": "node --experimental-...
StrangeGirlMurph's user avatar
2 votes
0 answers
1k views

Make VS Code open Chrome browser when running 'npm start' React script when inside a Linux WSL2 distro on Windows 11

I'm developing on a Windows 11 system in an Ubuntu WSL2 environment and I need VS Code to open Chrome instead of my system's default browser (MS Edge), when I run the 'npm start' React script. I've ...
Darren Evans's user avatar
0 votes
1 answer
385 views

npm run fails for some reason

Why would the following command fail? npm run "start:desktop -- --app word" says: npm ERR! Missing script: "start:desktop -- --app word" I have ensured that start:desktop script ...
dotNET's user avatar
  • 35.5k
0 votes
1 answer
2k views

Terminal process get killed with code ELIFECYCLE errno: 137 when VS Code is open. Quitting VS Code resolves the issue?

I've only recently in the last two days begun encountering this issue. When I attempt to build my Angular project, It's getting to this one point and failing with errors below. The only way I can get ...
js-newb's user avatar
  • 513
0 votes
1 answer
788 views

VScode: How to exclude some folders from npm script search

For trying to solve a problem in an Electron project in VsCode, I've made a backup of my node_modules folder and named it nodemodules_Back and paste a node_modules folder from a very close project. ...
Alain BUFERNE's user avatar
0 votes
2 answers
1k views

'NPM Scripts' missing in VS Code after update to 1.58.0

The "NPM Scripts" view is missing from Views dropdown in the Explorer in my VS Code after I updated to version 1.58.0 today. How do I enable that? I have tried "Reload Window", ...
RH.'s user avatar
  • 32
2 votes
0 answers
1k views

How to automatically run tests when saving a file, in VSCode? [duplicate]

Is it possible to natively (without extensions) execute npm run-script test every time I save a *.js file? What steps are necessary? I've created a Task in .vscode/launch.json: { "tasks":...
Kamafeather's user avatar
  • 9,965
67 votes
11 answers
55k views

NPM scripts not showing in the explorer sidebar

I have this problem with Visual Studio Code for Windows 10: I can't see the NPM scripts in the explorer sidebar. I deleted all the extensions, uninstalled VS Code, and installed the latest version of ...
YellowBlue's user avatar
5 votes
0 answers
1k views

Restart npm scripts on Visual Studio Code

Is there a restart button to restart npm scripts on visual studio code like the ones that exist in IntelliJ? Until now, I need to close the terminal running the npm script and start it again.
Jöcker's user avatar
  • 6,848
0 votes
0 answers
86 views

How does one pipe stdout to a parent process' stdout?

I'm not sure if this is specific to npm scripts, or to visual studio code, or to shell scripting in general so please bear with me. The setup is like this. I have a react project running through ...
Beard Tony's user avatar
2 votes
0 answers
540 views

Visual Studio Code - Exclude subdirectories from NPM Script Explorer

My workspace directory contains package.json with some scripts and two subdirectories containing few other package.json files that I want to exclude from Script Explorer. Call them adir, bdir. But any ...
SiliconValley's user avatar

15 30 50 per page