1

I am getting an error while trying to run my project on dev mode.

user@Apples-MacBook-Pro myproject (hotfix/carousel-2) $ npm run dev

> [email protected] dev /Users/user/nuxt-projects/myproject
> nuxt

/Users/user/nuxt-projects/myproject/node_modules/vue-server-renderer/index.js:8
  throw new Error(
  ^

Error: 

Vue packages version mismatch:

- [email protected]
- [email protected]

I tried deleting the node_modules directory and re-run npm insatll, but still getting the same error. Could you please point me to the right direction?

2
  • 1
    change version of vue-server-renderer to 2.5.16 manually. Commented Jul 23, 2018 at 10:15
  • Do u have vue-server-render in your package.json? Deleting it should work Commented Jul 23, 2018 at 23:17

3 Answers 3

3

I solved same problem with deleting cache files and package lock files.

rm -rf package-lock.json && npm cache clean

If you used yarn instead of npm, then

rm -rf yarn.lock && yarn cache clean

After removing lock files, install again

npm install

OR

yarn install --network-timeout 600000

Later, it might solve same problems.

Sign up to request clarification or add additional context in comments.

1 Comment

As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use npm install --cache /tmp/empty-cache to use a temporary cache instead of nuking the actual one. If you're sure you want to delete the entire cache, rerun this command with --force.
0

Eventually I got it to work by using:

  1. rm -rf node_modules/ // Removes node_modules folder
  2. rm -rf package-lock.json && npm cache clean --force //Removes package-lock file and cleans cache forcefully (npm v5+)
  3. npm install // do a fresh install

Thanks @luiseok

Comments

0
npm audit fix --force 

This command is the quick fix for your question

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.