Duroktar / vscode-npm-scripts

View and run NPM scripts in the sidebar
MIT License
28 stars 13 forks source link

Problem in executeCommand.ts #17

Open SrBrahma opened 3 years ago

SrBrahma commented 3 years ago

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.

Duroktar commented 3 years ago

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

laura-san-martin commented 3 years ago

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.

SrBrahma commented 3 years ago

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.