You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've ran into an issue where running npm install after checking out a different branch does not update the local node_modules folder and there is still an old version of a module installed - even though the package.json file contains an updated version of the dependency.
Deleting all node_modules folders in the workspace and running npm install again installs the correct version. I assume it has something to do with cache detection and not fully running npm install because npm thinks everything is already correctly installed.
Running npm install should have the same results if it is being run with node_modules present or not-present. In particular dependencies should be updated if a dependency's version has changed in package.json.
Is there an existing issue for this?
Current Behavior
I've ran into an issue where running
npm install
after checking out a different branch does not update the localnode_modules
folder and there is still an old version of a module installed - even though the package.json file contains an updated version of the dependency.Deleting all
node_modules
folders in the workspace and runningnpm install
again installs the correct version. I assume it has something to do with cache detection and not fully runningnpm install
because npm thinks everything is already correctly installed.The issue might be related to #3196.
Expected Behavior
Running
npm install
should have the same results if it is being run withnode_modules
present or not-present. In particular dependencies should be updated if a dependency's version has changed in package.json.Steps To Reproduce
npm install
npx prettier --version
-> It logs 2.2.1 which is correct as it is also specified in the rootpackage.json
npm install
againnpx prettier --version
again -> It still logs 2.2.1, although the root package.json specified prettier at version 2.3.0node_modules
folders in the workspace and child workspacesnpm install
againnpx prettier --version
again -> It now correctly logs 2.3.0Environment
The text was updated successfully, but these errors were encountered: