You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removing packages that are listed in yarn.lock from node_modules without removing node_modules itself then running yarn install does not see Yarn reinstall the missing packages.
If the current behavior is a bug, please provide the steps to reproduce.
> mkdir test && cd test
> npm init --yes
<... snip ...>
> yarn add leftpad
yarn add v0.23.2
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
└─ leftpad@0.0.0
✨ Done in 0.61s.
> ls node_modules
leftpad
> cat yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
leftpad@^0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/leftpad/-/leftpad-0.0.0.tgz#020c9ad0787216ba0f30d79d479b4b355d7d39c3"
> rm -rf node_modules/leftpad
> yarn install
yarn install v0.23.2
[1/4] 🔍 Resolving packages...
success Already up-to-date.
✨ Done in 0.17s.
> ls node_modules
> cat yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
leftpad@^0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/leftpad/-/leftpad-0.0.0.tgz#020c9ad0787216ba0f30d79d479b4b355d7d39c3"
> rm -rf node_modules
> yarn install
yarn install v0.23.2
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
✨ Done in 0.21s.
> ls node_modules
leftpad
> cat yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
leftpad@^0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/leftpad/-/leftpad-0.0.0.tgz#020c9ad0787216ba0f30d79d479b4b355d7d39c3"
What is the expected behavior?
In the above example, when node_modules is present but empty, leftpad should be installed to bring it up-to-date with the lockfile.
Please mention your node.js, yarn and operating system version.
Node: 6.9.1
Yarn: 0.23.2
OS: OS X 10.11.6
The text was updated successfully, but these errors were encountered:
seansfkelley
changed the title
yarn install doesn't install is node_modules is present but in the wrong stateyarn install doesn't install if node_modules is present but in the wrong state
Apr 21, 2017
I just found #2240 which appears to be a duplicate of this issue, so it looks like this is a point of confusion that has been around for quite some time.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Removing packages that are listed in
yarn.lock
fromnode_modules
without removingnode_modules
itself then runningyarn install
does not see Yarn reinstall the missing packages.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
In the above example, when
node_modules
is present but empty,leftpad
should be installed to bring it up-to-date with the lockfile.Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: