Forcing Yarn to check and install dependencies
Published on 2021-02-17 • Modified on 2021-02-17
It's something to know about Yarn. When running install (when a previous install has already be done), it doesn't check that every dependency is correctly installed. If you delete, rename something inside the node_modules
folder by mistake, a standard yarn update
can run without doing anything nor raising any warning. To force it to check all the files and folders, you have to use the --check-files
option. If something is wrong, it will be fixed. You can also run the check alone by running: yarn check --integrity --verify-tree
. Note that it won't work if a file is modified; it won't be restored to its original state. In this case, it's better to delete the whole dependency to reset it.
yarn install --check-files
More on Stackoverflow Read the doc Random snippet
Call to action
Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉
