Is there an existing issue for this?
Current Behavior
Running npm install does not install correct versions of dependencies in place of the existing old versions if the lockfile includes a version change in addition to dependency version upgrades. See reproduction for more details.
Related or possibly a duplicate of: #3057, #3196.
Expected Behavior
After running npm install, the dependencies in node_modules should match the lockfile contents.
Steps To Reproduce
git clone git@github.com:denis-sokolov/npm-6-to-7-old-dependency-reproduction.git && cd npm-6-to-7-old-dependency-reproduction
git checkout base
npm6 install (I used 6.14.9)
git checkout master
npm7 install (I used 7.11.2)
cat node_modules/\@types/react-select/package.json | grep 'version":'
Observed:
"version": "3.0.22"
Expected:
"version": "4.0.15",
Workaround: rm -rf node_modules && npm install.
If reproduction fails, please see the with-node-modules branch that has node_modules included in the repository.
Environment
- OS: macOS 11.3.1
- Node: 14.14.0
- npm: 7.11.2, also reproduced with 7.13.0
Is there an existing issue for this?
Current Behavior
Running npm install does not install correct versions of dependencies in place of the existing old versions if the lockfile includes a version change in addition to dependency version upgrades. See reproduction for more details.
Related or possibly a duplicate of: #3057, #3196.
Expected Behavior
After running npm install, the dependencies in node_modules should match the lockfile contents.
Steps To Reproduce
git clone git@github.com:denis-sokolov/npm-6-to-7-old-dependency-reproduction.git && cd npm-6-to-7-old-dependency-reproductiongit checkout basenpm6 install(I used 6.14.9)git checkout masternpm7 install(I used 7.11.2)cat node_modules/\@types/react-select/package.json | grep 'version":'Observed:
Expected:
Workaround:
rm -rf node_modules && npm install.If reproduction fails, please see the
with-node-modulesbranch that has node_modules included in the repository.Environment