vscode-npm-scripts icon indicating copy to clipboard operation
vscode-npm-scripts copied to clipboard

Problem in executeCommand.ts

Open ftzi opened this issue 4 years ago • 3 comments

When clicking a script, it was executing "auto run scripName". Reading the code, I found out this:

const packageManager: string =
      workspace.getConfiguration("npm").get("packageManager") || "npm";

In my VsCode configs, in npm>packageManager, it was using the "auto" option, to select automatically if it is npm or yarn.

Got it? I changed it to npm and it is now being executed correctly. The extension should have a way to deal with this.

ftzi avatar Dec 12 '20 04:12 ftzi

Thanks for pointing that out. I'll try to patch it this weekend along with #16. Cheers

Duroktar avatar Dec 12 '20 06:12 Duroktar

When clicking a script, it was executing "auto run scripName". Reading the code, I found out this:

const packageManager: string =
      workspace.getConfiguration("npm").get("packageManager") || "npm";

In my VsCode configs, in npm>packageManager, it was using the "auto" option, to select automatically if it is npm or yarn.

Got it? I changed it to npm and it is now being executed correctly. The extension should have a way to deal with this.

For anyone wondering, you can set this in VS Code > File > Preferences > Settings, scroll down till Extensions > NPM and set Package Manager to npm:

image

It's a wrokaround for now. I believe it was a VS Code update that set this 'auto' thing, mine was working perfectly until a few days ago.

laura-san-martin avatar Dec 16 '20 19:12 laura-san-martin

When clicking a script, it was executing "auto run scripName". Reading the code, I found out this:

const packageManager: string =
      workspace.getConfiguration("npm").get("packageManager") || "npm";

In my VsCode configs, in npm>packageManager, it was using the "auto" option, to select automatically if it is npm or yarn. Got it? I changed it to npm and it is now being executed correctly. The extension should have a way to deal with this.

For anyone wondering, you can set this in VS Code > File > Preferences > Settings, scroll down till Extensions > NPM and set Package Manager to npm:

image

It's a wrokaround for now. I believe it was a VS Code update that set this 'auto' thing, mine was working perfectly until a few days ago.

Yeah, mine was also working until recently (and then I found out the causing issue).

However, if I remember right, I had already used this extension some time ago and then I removed it as it was throwing the same issue. Maybe it's not the first time VSCode change something about the current package manager checker.

ftzi avatar Dec 16 '20 19:12 ftzi