-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode setting packageManager in package.json unconditionally #210556
Comments
I know it may have been a feature, yet it doesn't meet expectations. what's more, the behavior modifies and saves a project file without any prompt and attempts to overwrite repeatedly, which clearly exceeds what an editor should do, I believe that categorizes this as a bug. |
sounds like something that's coming from an extension. you can set your package manager with this setting
|
as I said, all extensions were disabled
as I said, "npm.packageManager" setting doesn't provide a "none" option. |
Why is that a problem for you? |
do I really have to repeat everything I wrote in the issue?
seriously, I have multiple js environments in my environment, both corepack and very old package manager versions. I prefer not to use corepack in my old project for better collaboration with others, however vscode forces me to do so since package managers would refuse to run if packageManager field specified toolchain mismatches. This is annoying at most, but my core concern is that how am I going to trust vscode with my other project configuration files if that "isn't a problem"? could you re-open this issue? actually why are you closing this issue in the first place without confirming that it's solved? Issues are not oncalls! |
I closed because I do not plan to fix this. |
good for you then |
I take back the "trust issues" narrative, however this behavior is still surprising. take a look at the PR please |
I could not reproduce that
@frankli0324 Do you have the steps to reproduce this from the command line? |
Verified the fix in code |
the minimum path from a clean install would be: brew install corepack
corepack enable npm
npm view --json and by now this should be true:
|
corepack is part of node 20, so I used it directly, not using brew (which I don't have on my system) I kind of think having |
have you see [corepack README]:
|
it seems that many other projects including pnpm also ran into similar issues and some debate is still ongoing https://github.com/pnpm/pnpm/pull/7747/files |
Ah, the aliases. They were probably not used when I tested it. |
I don't really get what's the issue here, but I know, that always, when VScode is open, there is a new line added to my package.json
edit. ok, I added |
Type: Bug
open a package.json file and wait, packageManager appeared as "[email protected]+sha256.7cb31c0a881964a22577fd84e5a9a5b11e6f49ef8aa0893036b0b68015056252". "npm.packageManager" setting doesn't provide a "none" option.
this is happening with all extensions disabled.
VS Code version: Code 1.88.1 (Universal) (e170252, 2024-04-10T17:42:52.765Z)
OS version: Darwin arm64 23.1.0
Modes: Unsupported
A/B Experiments
The text was updated successfully, but these errors were encountered: