You may receive a fix message that looks like the below when your npm node_modules folder for your project is out of date, with the advice "Your dependencies are out of date. Try reinstalling your dependencies. If the problem persists, one of your dependencies may be bundling outdated modules.".
To resolve this issue in the CLI:
- Navigate to your project folder
- Back up or delete your node_modules folder.
- Run:
npm install
to allow your dependencies to be rebuilt, which will resolve the message you see above, once the project is re-synced.
Alternatively, you can also just delete/back-up your package-lock.json file and then execute a npm install
command
If the npm install runs successfully, but the error remains, please check your package-lock.json file for the lockfile version. See the Snyk for JavaScript documentation for supported lockfile versions.
To force npm to install a particular version lockfile, you can use
npm install --lockfile-version=<version>