PS D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm> npm run dev
> vue-element@4.4.0 dev D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm
> vue-cli-service serve
INFO Starting development server...
ERROR Error:
Vue packages version mismatch:
- vue@2.6.10 (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.7.16 (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\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 vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
Error:
Vue packages version mismatch:
- vue@2.6.10 (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.7.16 (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\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 vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.
at Object.<anonymous> (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\vue-template-compiler\index.js:10:9)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at loadFromContext (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\@vue\cli-service\node_modules\vue-loader\lib\compiler.js:30:10)
at loadTemplateCompiler (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\@vue\cli-service\node_modules\vue-loader\lib\compiler.js:37:12)
at exports.resolveCompiler (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\@vue\cli-service\node_modules\vue-loader\lib\compiler.js:25:23)
at VueLoaderPlugin.apply (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\@vue\cli-service\node_modules\vue-loader\lib\plugin-webpack4.js:91:22)
at VueLoaderPlugin.apply (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\@vue\cli-service\node_modules\vue-loader\lib\plugin.js:13:16)
at webpack (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\webpack\lib\webpack.js:51:13)
at serve (D:\code\LvLiangSmartConstruct\stage_01\code\client\DevFrontend\backstage-manage-gd-pm\node_modules\@vue\cli-service\lib\commands\serve.js:163:22)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-element@4.4.0 dev: `vue-cli-service serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-element@4.4.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2024-02-23T05_16_34_986Z-debug.log
卸载vue-template-compiler,重新安装vue-template-compiler@2.7.16。install一下。就好了