Skip to content

Instantly share code, notes, and snippets.

@mollerse
Last active February 22, 2018 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mollerse/81ad37157993471907cb5c944901601f to your computer and use it in GitHub Desktop.
Save mollerse/81ad37157993471907cb5c944901601f to your computer and use it in GitHub Desktop.
Repro of stuff in node_modules/.bin disappearing with npm-ci
{
"name": "npm-ci-repro",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "rm -rf node_modules package-lock.json && npm i && ls node_modules/.bin && npm ci && ls node_modules/.bin"
},
"keywords": [],
"license": "ISC",
"devDependencies": {
"json2csv": "3.11.5",
"npm-run-all": "4.1.2"
},
"dependencies": {
"d3": "4.11.0"
}
}
@mollerse
Copy link
Author

Seems it will only reproduce if the colliding binary-names comes from a transitive dependency. In this case it is d3-dsv which provides the binaries that collides with json2csv.

@mollerse
Copy link
Author

Adding the transitive dependency as a proper dependency seems to solve the issue

@mollerse
Copy link
Author

Also, the state of the local npm-cache seems to effect the outcome. If I add the transitive dep as a proper dep, install, and then remove the transitive dep again the bug will not reproduce.

@mollerse
Copy link
Author

Also, this is on macOS 10.13.3, with node v 8.9.4 and npm 5.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment