Open robrichard opened 7 years ago
@robrichard you could use --force
@robrichard from https://github.com/yarnpkg/yarn/issues/2240#issuecomment-300762981 try yarn --check-integrity
Also, in the steps to reproduce before step 6 if you use yarn check
you will get an error:
$ rm -rf node_modules/lodash.get
$ yarn check
yarn check v0.27.5
error "lodash.get" not installed
error Found 1 errors.
info Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.
Not sure if this is intended behavior, but it was confusing to me.
Steps to reproduce 1) I created a new project using yarn init, and answered with the defaults to each prompt. 2) Added two dependencies --
yarn add lodash.find
--yarn add lodash.get
3) Remove node modulesrm -rf node_modules
4)yarn install
5) Manually remove one of the dependenciesrm -rf node_modules/lodash.get
6) Runningyarn install
again says "Already up-to-date." and does not install the missing packageExpected behavior I would have expected yarn to install the missing
lodash.get
. We runyarn install
on our CI server to run tests on pull requests before they are merged. If one branch causes a dependency to be removed, then another one requires it, yarn install will report success but the build will fail because required dependencies are not installed. I would expectyarn install
to always deterministically ensure that every dependency is installed in node_modulesPlease mention your node.js, yarn and operating system version. node v6.9.1, yarn v0.19.1, macOS 10.12.2
Contents of yarn.lock