I have a project which is using rush as a build tool.
package.json
includes both dependencies
and devDependencies
sections.
A package foo
is referenced in both sections. I want to update foo
from version 1 to version 2
If I run the command
rush add -p foo@2 -m
Only the reference in the devDependencies
section is updated. Same if I run
rush add -p foo@2 -m --dev
Any suggestion on how to update the package in both sections? I am using node 20.9.0, pnpm 8.9.1, npm 6.14.15, rush 5.109.2
I'm not sure it is the correct way of keeping the dependencies.
So if you have the package in dependencies
- you could remove it from devDependencies
. But make sure it is really needed in build/run time. It might be better to move some packages from dependencies
to devDependencies
So Rush.js should not update the dependencies in both places.