Skip to content

Instantly share code, notes, and snippets.

@otakustay
Created October 13, 2016 05:26
Show Gist options
  • Save otakustay/f6499dddfb0f8b8930fdd737e8b0c343 to your computer and use it in GitHub Desktop.
Save otakustay/f6499dddfb0f8b8930fdd737e8b0c343 to your computer and use it in GitHub Desktop.
Yarn on dependency conflicts
{
"name": "alice",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"underscore": "1.7.x"
}
}
{
"name": "bob",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"underscore": "1.7.x"
}
}
{
"name": "foo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"underscore": "1.5.x"
}
}
{
"dependencies": {
"alice": "file:../alice",
"bob": "file:../bob",
"foo": "file:../foo"
}
}
~/Dev/s/main » npm i otakustay@Gray-MacBook-Pro
/Users/otakustay/Dev/s/main
├─┬ alice@1.0.0
│ └── underscore@1.7.0
├── bob@1.0.0
└─┬ foo@1.0.0
└── underscore@1.5.2
npm WARN main No description
npm WARN main No repository field.
npm WARN main No license field.
------------------------------------------------------------
~/Dev/s/main » tree -L 3 node_modules otakustay@Gray-MacBook-Pro
node_modules
├── alice
│   └── package.json
├── bob
│   └── package.json
├── foo
│   ├── node_modules
│   │   └── underscore
│   └── package.json
└── underscore
├── LICENSE
├── README.md
├── package.json
├── underscore-min.js
└── underscore.js
6 directories, 8 files
~/Dev/s/main » yarn install otakustay@Gray-MacBook-Pro
yarn install v0.15.1
warning No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Saved lockfile.
✨ Done in 0.20s.
------------------------------------------------------------
~/Dev/s/main » ls node_modules/ otakustay@Gray-MacBook-Pro
------------------------------------------------------------
~/Dev/s/main » tree -L 3 node_modules otakustay@Gray-MacBook-Pro
node_modules
├── alice
│   ├── node_modules
│   │   └── underscore
│   └── package.json
├── bob
│   ├── node_modules
│   │   └── underscore
│   └── package.json
├── foo
│   ├── node_modules
│   │   └── underscore
│   └── package.json
└── underscore
├── LICENSE
├── README.md
├── package.json
├── underscore-min.js
└── underscore.js
10 directories, 8 files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment