https://github.com/springmeyer/bundle-dedupe-testcase
Testcase replicating bad interaction between node v6/npm 3 and node-pre-gyp
https://github.com/springmeyer/bundle-dedupe-testcase
Last synced: 7 months ago
JSON representation
Testcase replicating bad interaction between node v6/npm 3 and node-pre-gyp
- Host: GitHub
- URL: https://github.com/springmeyer/bundle-dedupe-testcase
- Owner: springmeyer
- Created: 2017-05-09T16:25:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-16T20:37:52.000Z (about 9 years ago)
- Last Synced: 2024-12-28T18:28:24.594Z (over 1 year ago)
- Language: Python
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
[](https://travis-ci.org/springmeyer/bundle-dedupe-testcase)
This testcase replicates an error of:
```
npm ERR! missing: minimist@0.0.8, required by mkdirp@0.5.1
```
That happens with node v6.10.3 and npm v3.10.10 when `npm ls` is run after install of the module. What appears to be happening is that:
- The module depends on `minimist@~1.2.0`
- The module depends on `node-pre-gyp` which depends on `mkdirp@^0.5.1`
- `mkdirp@0.5.1` is pinned exactly to `minimist@0.0.8`: https://github.com/substack/node-mkdirp/blob/f2003bbcffa80f8c9744579fabab1212fc84545a/package.json#L19
- During npm install the `mkdirp` is installed in the node-pre-gyp modules folder
- With node v0.10, v4, and v7 the `minimist@1.2.0` is installed at the top level and `minimist@0.0.8` is installed within the `mkdirp` dependended upon my `node-pre-gyp`.
- With node v6 the `minimist@1.2.0` is installed at the top level and `minimist@0.0.8` is NOT installed within the `mkdirp` dependended upon my `node-pre-gyp`.
- During npm install `node-pre-gyp` is run and the `mkdirp` appears to work at runtime with all versions of node despite the deduping problem with node v6
- Npm runs `prepublish` during install - context at https://github.com/npm/npm/blob/latest/CHANGELOG.md#new-prepare-script-prepublish-deprecated-breaking
- With node v6 the `npm ls` that is run during `prepublish` (which is automatically run by npm at the end of the install) errors since the pinnned `minimist@0.0.8` is missing.
The tree that `npm ls` is outputs (when it returns an error with node v6) is:
```
└─┬ node-pre-gyp@0.6.34
├���┬ mkdirp@0.5.1
│ └── UNMET DEPENDENCY minimist@0.0.8
```
This does not happen with node v7 and npm v4.2.0