vue/cli 安装出错解决

安装vue-cli出错

D:\code\vue_code>npm install -g @vue/cli
npm ERR! code EINTEGRITY
npm ERR! path C:\Users\xxx\AppData\Local\npm-cache\_cacache\content-v2\sha512\f5\32\605bc70f6f0383c6babf834c59f8b26e5944061f77b86774c8b267c115496e57205801bde1328607527963daab39d70a21084aea54197155e4c264473ecb
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npm.taobao.org/slash: Integrity verification failed for sha512-9TJgW8cPbwODxrq/g0xZ+LJuWUQGH3e4Z3TIsmfBFUluVyBYAb3hMoYHUnlj2qs51wohCErqVBlxVeTCZEc+yw== (C:\Users\xxx\AppData\Local\npm-cache\_cacache\content-v2\sha512\f5\32\605bc70f6f0383c6babf834c59f8b26e5944061f77b86774c8b267c115496e57205801bde1328607527963daab39d70a21084aea54197155e4c264473ecb)

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\xxx\AppData\Local\npm-cache\_logs\2021-12-13T11_46_52_646Z-debug-0.log

解决:

清除缓存:

npm cache clear --force

重新安装:

D:\code\vue_code>npm cache clear --force
npm WARN using --force Recommended protections disabled.

D:\code\vue_code>npm install -g @vue/cli
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated graphql-extensions@0.15.0: The `graphql-extensions` API has been removed from Apollo Server 3. Use the plugin API instead: https://www.apollographql.com/docs/apollo-server/integrations/plugins/
npm WARN deprecated apollo-tracing@0.15.0: The `apollo-tracing` package is no longer part of Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#tracing for details
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated apollo-cache-control@0.14.0: The functionality provided by the `apollo-cache-control` package is built in to `apollo-server-core` starting with Apollo Server 3. See https://www.apollographql.com/docs/apollo-server/migration/#cachecontrol for details.
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated graphql-tools@4.0.8: This package has been deprecated and now it only exports makeExecutableSchema.\nAnd it will no longer receive updates.\nWe recommend you to migrate to scoped packages such as @graphql-tools/schema, @graphql-tools/utils and etc.\nCheck out https://www.graphql-tools.com to learn what package you should use instead

added 952 packages in 2m

13 packages are looking for funding
  run `npm fund` for details

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
@vue/cli 是一个用于快速搭建 Vue.js 项目的脚手架工具。安装 @vue/cli 后,可以使用 vue 命令来执行一些与 Vue.js 相关的操作,如创建项目、运行开发服务器等。 根据你的描述,出现了 "vue 不是内部或外部命令,也不是可运行的程序或批处理文件" 的错误提示,这通常是由于系统环境变量配置不正确导致的。为了解决这个问题,你可以尝试以下几个步骤: 1. 确保你已经正确安装了 @vue/cli。可以通过运行以下命令来检查安装情况: ``` vue --version ``` 如果显示版本号,则表示 @vue/cli 已经成功安装。 2. 检查系统环境变量配置。请确保将 @vue/cli 安装的路径添加到系统的 PATH 环境变量中。具体步骤如下: - 打开控制面板,并进入“系统和安全” -> “系统” -> “高级系统设置”。 - 在弹出的窗口中,点击“环境变量”按钮。 - 在“系统变量”列表中找到名为 "Path" 的变量,并点击“编辑”按钮。 - 在弹出的窗口中,点击“新建”按钮,并添加 @vue/cli 安装的路径(通常是类似于 "C:\Users\YourUsername\AppData\Roaming\npm" 的路径)。 - 确认所有窗口,并重新打开命令行终端。 3. 如果以上步骤都没有解决问题,可以尝试重新安装 @vue/cli。首先卸载已有的 @vue/cli,然后重新安装最新版本。 如果你已经尝试了以上步骤但问题仍然存在,请提供更多详细信息,以便我能够更好地帮助你解决问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值