If you enter vue create, you will receive the following error.
mac:vue-nuxt hogehoge $vue create my-app
/Users/hogehoge/.nodebrew/node/v12.13.1/lib/node_modules/@vue/cli/node_modules/vue-template-compiler/index.js:10
US>throw new Error(
^
Error:
Vue packages version mismatch:
- [email protected] (/Users/hogehoge/node_modules/vue/dist/vue.runtime.common.js)
- [email protected] (/Users/hogehoge/.nodebrew/node/v12.13.1/lib/node_modules/@vue/cli/node_modules/vue-template-compiler/package.json)
This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or verify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
at Object.<anonymous>(/Users/hogehoge/.nodebrew/node/v12.13.1/lib/node_modules/@vue/cli/node_modules/vue-template-compiler/index.js:10:9)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js: 815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous>(/Users/hogehoge/.nodebrew/node/v12.13.1/lib/node_modules/@vue/cli/node_modules/vue-jscodeshift-adapter/src/parse-sfc.js:18)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
I have done many things such as upgrading the update node of the vue-template-compiler, but the error here does not change every time.
Is there any solution?
javascript vue.js npm
The version of vue and vue-template-compiler does not match (mismatch) error.It may be solved by combining the versions of the two packages.
I don't know because I haven't reproduced it, but I will share it with you because a similar question was posted on another page.
Just to guess, it may be the same situation as the contents of this URL.
https://github.com/vuejs/vue-cli/issues/4394
Each package has a different location.(/Users/hogehoge/node_modules/...
and /Users/hogehoge/.nodebrew/node/v12.13.1/lib/node_modules/...
), so if you actually removed it, you might want to remove it.
(Same answer as hinaloe)
This seems to be about the same question (English):
https://superuser.com/questions/1456372/how-do-i-remove-the-error-in-vue-create
Similar questions and answers:
https://stackoverflow.com/questions/43397688/how-do-i-fix-a-vue-packages-version-mismatch-error-on-laravel-spark-v4-0-9
npm install
and so on outside the project.
If /Users/hogehoge/
has done npmisntall instead of project directory , and the node_modules
directory is directly below it, try removing it or renaming it.
© 2024 OneMinuteCode. All rights reserved.