1.提示没有权限解决方案

配置npm服务地址:账号及密码登录、邮件登录

npm登录私服:

npm login --registry=http://registry.xxx:端口/repository/xxx-npm/
Username: xxx
Password: xxx
Email: (this IS public) xxx@xxxcmp.cn


npm login --registry=http://registry.xxx:端口/repository/npm-public/
Username: xxx
Password: xxx
Email: (this IS public) xxx@xxxcmp.cn

2. vue和vue-template-compiler版本不匹配问题

Vue packages version mismatch:

- vue@2.6.11 (D:\nodejs\node_global\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.6.14 (D:\hzhiwcode\20210401wms\ui\ui-inventory-config-sys\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.


 @ ./src/main.js 5:0-24
 @ multi (webpack)-dev-server/client?http://0.0.0.0:30741 webpack/hot/dev-server ./src/main.js

 error  in ./src/App.vue

Module build failed: TypeError: Cannot read property 'parseComponent' of undefined
    at parse (D:\hzhiwcode\20210401wms\ui\ui-inventory-config-sys\node_modules\@vue\component-compiler-utils\dist\parse.js:15:23)
    at Object.module.exports (D:\hzhiwcode\20210401wms\ui\ui-inventory-config-sys\node_modules\vue-loader\lib\index.js:67:22)

 @ ./src/main.js 5:0-24
 @ multi (webpack)-dev-server/client?http://0.0.0.0:30741 webpack/hot/dev-server ./src/main.js

一般的解决方法是更新vue到与vue-template-compiler同版本

npm install vue@2.6.14 --save

 

 

Logo

前往低代码交流专区

更多推荐