-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[BUG] npm audit fix --force
alternates between downgrading and upgrading packages
#5046
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
Comments
I'm seeing the same issue.
|
It looks like this is what causing the issue (note the
So it looks like |
Following up on the issue I mentioned before, it looks like the fix/workaround for this issue is to move |
npm audit --fix
alternates between downgrading and upgrading packagesnpm audit fix --force
alternates between downgrading and upgrading packages
@tomerb thanks for your workaround but I think the underlying issue needs to be ultimately fixed. It doesn't seem like it should be possible via |
…s to dev dependencies npm/cli#5046
Related #2798 |
This is essentially a dupe of #2798, but with very clear reproduction instructions. I'll close this one here, but we'll use your report when working on the previous issue. |
Uh oh!
There was an error while loading. Please reload this page.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Running
npm audit fix --force
results in thereact-scripts
version being changed from 5.0.1 to 2.1.3. Running the command again will alternate between version 2.1.3 and 5.0.1.#3472 is possibly related but the original description appears to be different.
Expected Behavior
The audit command to apply patches to a dependency, and not downgrade and then alternate versions.
Steps To Reproduce
mkdir npm-test && cd npm-test
npm i [email protected]
npm audit fix --force
npm ls react-scripts
[email protected]
npm audit fix --force
npm ls react-scripts
[email protected]
Environment
The text was updated successfully, but these errors were encountered: