Reputation: 7733
I am trying to migrate my web app from npm to Yarn. When I run yarn install --production
it completes successfully. However when I start it using node webpack.js
it tells me:
ERROR in Cannot find module 'lodash._isiterateecall'
ERROR in Cannot find module 'has'
These two projects aren't in the node_modules folder, but they are listed as dependencies in the yarn.lock
file.
Anyone got any ideas why? Is this a bug in Yarn?
I am using yarn 0.17.2 and npm 2.15.9
Upvotes: 5
Views: 11618
Reputation: 318
with me, i fixed the issue with
yarn install --network-concurrency 1
Upvotes: 1
Reputation: 3058
There is something to do, called integrity check.
If you run yarn check
it correctly notes the missing dependency. But when you simply yarn / yarn install
, it assumes all is well. Delete yarn.integrity and it obviously rebuilds.
What we need is for yarn install to automatically do an integrity check. If the check fails, it should rebuild.
yarn install --skip-integrity-check
seems to actually do the trick
Upvotes: 1
Reputation: 5931
Is this a bug in Yarn? Yes checkout below link yarn install --production` doesn't install correct dependencies
Try to do follow the steps . Can you do a yarn cache clean and try again?
npm ls entities after yarn --prod
yarn check --prodution --verify-tree
Upvotes: 5