Skip to content

Instantly share code, notes, and snippets.

@brophdawg11
Created December 21, 2016 21:38
Show Gist options
  • Save brophdawg11/ff156e0e6b28da3c66af63b871051d8c to your computer and use it in GitHub Desktop.
Save brophdawg11/ff156e0e6b28da3c66af63b871051d8c to your computer and use it in GitHub Desktop.
npm 4.1.1 Nested dependency resolution issue with [email protected]
~/working> mkdir hapi-npmv4-issue
~/working> cd hapi-npmv4-issue/
~/working/hapi-npmv4-issue> npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
name: (hapi-npmv4-issue)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
author:
license: (ISC)
About to write to /Users/brophym1/working/hapi-npmv4-issue/package.json:
{
"name": "hapi-npmv4-issue",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
Is this ok? (yes)
~/working/hapi-npmv4-issue> sudo npm install -g [email protected] > /dev/null
~/working/hapi-npmv4-issue> npm --version
4.1.1
~/working/hapi-npmv4-issue> npm install --save [email protected]
[email protected] /Users/brophym1/working/hapi-npmv4-issue
└─┬ [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
└── [email protected]
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
~/working/hapi-npmv4-issue> rm -rf node_modules/
~/working/hapi-npmv4-issue> sudo npm install -g [email protected] > /dev/null
~/working/hapi-npmv4-issue> npm --version
3.10.9
~/working/hapi-npmv4-issue> npm install --save [email protected]
[email protected] /Users/brophym1/working/hapi-npmv4-issue
└─┬ [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
└── [email protected]
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
@brophdawg11
Copy link
Author

The problematic scenario is line 59 ([email protected]) versus lines 107-108 ([email protected]), in which the latter is correct

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