PanJiaChen / vue-element-admin

:tada: A magical vue admin https://panjiachen.github.io/vue-element-admin
MIT License
87.9k stars 30.46k forks source link

npm run dev 启动报错,vue.config.js 打开乱码 怎么解决啊 #3423

Open zmwang1123 opened 4 years ago

zmwang1123 commented 4 years ago

PS D:\工作\vue\element-admin\vue-element-admin> npm run dev

vue-element-admin@4.4.0 dev D:\工作\vue\element-admin\vue-element-admin vue-cli-service serve

ERROR Error loading D:\工作\vue\element-admin\vue-element-admin\vue.config.js: ERROR SyntaxError: Invalid or unexpected token D:\工作\vue\element-admin\vue-element-admin\vue.config.js:1 b#eY ^

SyntaxError: Invalid or unexpected token at wrapSafe (internal/modules/cjs/loader.js:1053:16) at Module._compile (internal/modules/cjs/loader.js:1101:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10) at Module.load (internal/modules/cjs/loader.js:985:32) at Function.Module._load (internal/modules/cjs/loader.js:878:14) at Module.require (internal/modules/cjs/loader.js:1025:19) at require (internal/modules/cjs/helpers.js:72:18) at exports.loadModule (D:\工作\vue\element-admin\vue-element-admin\node_modules\@vue\cli-shared-utils\lib\module.js:79:14) at Service.loadUserOptions (D:\工作\vue\element-admin\vue-element-admin\node_modules\@vue\cli-service\lib\Service.js:326:22) at Service.init (D:\工作\vue\element-admin\vue-element-admin\node_modules\@vue\cli-service\lib\Service.js:70:30) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! vue-element-admin@4.4.0 dev: vue-cli-service serve npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the vue-element-admin@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\wangzhongmin\AppData\Roaming\npm-cache_logs\2020-09-16T03_00_43_410Z-debug.log

aysuays commented 4 years ago

did you do npm install first?