`vue-cli-service`不是内部或外部命令,解决方案
`vue-cli-service`不是内部或外部命令,解决方案初始化改变镜像问题未解决,请继续看还未解决依然未解决主要原因是vue-cli-service未安装初始化npm install此时默认的镜像地址是https://registry.npmjs.org因为代理问题部分组件无法正常下载,即安装异常改变镜像将镜像设置为淘宝的镜像npm install -g cnpm --registry=ht
·
主要原因是vue-cli-service未安装
初始化
npm install
此时默认的镜像地址是https://registry.npmjs.org
因为代理问题部分组件无法正常下载,即安装异常
方法一
将镜像设置为淘宝的镜像
npm install -g cnpm --registry=https://registry.npm.taobao.org
cnpm install
安装完成后
npm run dev
会看到成功了。
方法二
删除node modules ;重新安装 node modules;
如果没有 则 单独安装 vue-cli-service;
npm install vue-cli-service -S
方法三
npm install -g @vue/cli
方法四
yarn add vue-cli-service -S
安装过程中
cnpm install yarn
会提示
error An unexpected error occurred: "https://registry.npm.taobao.org/vue-cli-service: Not found".
设置镜像为默认的
yarn config set registry https://registry.npmjs.org/
或者
yarn config set registry https://registry.yarnpkg.com
安装
cnpm install yarn
yarn add vue-cli-service -S
安装完成后
npm run dev
成功了。
更多推荐
已为社区贡献1条内容
所有评论(0)