irpas技术客

vue : 无法将“vue”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确, 然后再试一次。_灬Man

未知 3249

报错内容 vue : 无法将“vue”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确, 然后再试一次。 所在位置 行:1 字符: 1 + vue -v + ~~~ + CategoryInfo : ObjectNotFound: (vue:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException 解决方案 方案一: npm install vue-cli -g //我的报错解决 方案二: npm install -g @vue/cli //我的报错执行后,还是未解决 上面两种 CLI 的安装都是不同版本,也许是对应的 VUE 版本有关吧。 各位大神,请留言指教。谢谢! 对于方案二的未解决,是因为 npm 安装 CLI 失败导致的,以下是报错代码 npm ERR! code EEXIST npm ERR! path x:\Program Files\nodejs\node_modules\@vue\cli\node_modules\_apollo-server-express@2.25.2@apollo-server-express\node_modules\@apollographql\graphql-playground-html\node_modules\.bin\xss.ps1 npm ERR! Refusing to delete x:\Program Files\nodejs\node_modules\@vue\cli\node_modules\_apollo-server-express@2.25.2@apollo-server-express\node_modules\@apollographql\graphql-playground-html\node_modules\.bin\xss.ps1: ../../../../_xss@1.0.9@xss/bin/xss symlink target is not controlled by npm x:\Program Files\nodejs\node_modules\@vue\cli\node_modules\_apollo-server-express@2.25.2@apollo-server-express\node_modules\@apollographql\graphql-playground-html\node_modules\xss npm ERR! File exists: x:\Program Files\nodejs\node_modules\@vue\cli\node_modules\_apollo-server-express@2.25.2@apollo-server-express\node_modules\@apollographql\graphql-playground-html\node_modules\.bin\xss.ps1 npm ERR! Remove the existing file and try again, or run npm npm ERR! with --force to overwrite files recklessly. npm ERR! A complete log of this run can be found in: npm ERR! X:\Users\lq\AppData\Roaming\npm-cache\_logs\2021-08-31T06_22_53_363Z-debug.log 通过 cnpm 后,还是无法识别 vue , 报错如下: vue : 无法将“vue”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确, 然后再试一次。 所在位置 行:1 字符: 1 + vue + ~~~ + CategoryInfo : ObjectNotFound: (vue:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException


1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,会注明原创字样,如未注明都非原创,如有侵权请联系删除!;3.作者投稿可能会经我们编辑修改或补充;4.本站不提供任何储存功能只提供收集或者投稿人的网盘链接。

标签: #Vue #无法将vue项识别为 #请检查名称的拼写 #如果包括路径 #请确保路径正确