当我使用cli运行vue create时,出现以下错误:
我已经尝试了以下删除节点模块并进行npm安装的操作。
USHMUNB43588:〜emcgee $ vue创建vmyapp /usr/local/lib/node_modules/@vue/cli/node_modules/vue-template-compiler/index.js:10 抛出新的错误( ^
错误:
Vue软件包版本不匹配:
这可能会导致事情无法正常运行。确保两者使用相同的版本。 如果您使用的是vue-loader @> = 10.0,只需更新vue-template-compiler。 如果您使用的是vue-loader @ <10.0或vueify,则重新安装vue-loader / vueify会将vue-template-compiler升级到最新版本。
at Object.<anonymous> (/usr/local/lib/node_modules/@vue/cli/node_modules/vue-template-compiler/index.js:10:9)
at Module._compile (internal/modules/cjs/loader.js:868:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
at Module.load (internal/modules/cjs/loader.js:731:32)
at Function.Module._load (internal/modules/cjs/loader.js:644:12)
at Module.require (internal/modules/cjs/loader.js:771:19)
at require (internal/modules/cjs/helpers.js:68:18)
at Object.<anonymous> (/usr/local/lib/node_modules/@vue/cli/node_modules/vue-jscodeshift-adapter/src/parse-sfc.js:1:18)
at Module._compile (internal/modules/cjs/loader.js:868:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:879:10)
Package.json
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"de-indent": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
"integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0="
},
"he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
},
"vue-template-compiler": {
"version": "2.6.10",
"resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.10.tgz",
"integrity": "sha512-jVZkw4/I/HT5ZMvRnhv78okGusqe0+qH2A0Em0Cp8aq78+NK9TII263CDVz2QXZsIT+yyV/gZc/j/vlwa+Epyg==",
"dev": true,
"requires": {
"de-indent": "^1.0.2",
"he": "^1.1.0"
}
}
}
}