`npm install --before` does not ignore `node_modules/.package-lock.json`
Open
Nobody has claimed this yet.
Bug
Priority 1
Release 10.x
Release 7.x
Release 8.x
Release 9.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Current Behavior:
- Go to a repo that has had transitive dep publishes, but hasn’t had any root dep updates.
- Run
npm install - run
rm -rf node_modules/.bin && rm -rf node_modules/*(i usually do this to avoid deleting the node_modules dir and breaking my Dropbox sync settings) - Run
npm install --before=$lastRootDepUpdates - See install fail, not finding a transitive dep that was published after the date, but shouldn’t be required, and wouldn’t be on a fresh install.
- Run `rm -rf node_modules/.package-lock.json
- Run
npm install --before=$lastRootDepUpdates - See install pass
Expected Behavior:
Install passes at step 4.
Steps To Reproduce:
See above. I found this in https://github.com/yannickcr/eslint-plugin-react.
Environment:
- Node: 15.8.0
- npm: 7.5 (whatever it comes with)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in the listed eslint-plugin-react scenario with Node 15.8.0, npm 7.5, and npm install --before, comparing behavior before and after removing node_modules/.package-lock.json. Trace how npm install --before handles that file and confirm the install succeeds at step 4 without requiring its removal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100