使用 npm install -g @vue/cli命令报错

这篇具有很好参考价值的文章主要介绍了使用 npm install -g @vue/cli命令报错。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

使用命令出现报错

PS C:\Users\XX\Desktop> npm install  -g  @vue/cli
npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated apollo-datasource@3.3.2: The `apollo-datasource` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-errors@3.3.1: The `apollo-server-errors` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated apollo-server-types@3.8.0: The `apollo-server-types` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-plugin-base@3.7.2: The `apollo-server-plugin-base` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/server` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated shortid@2.2.16: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm WARN deprecated apollo-reporting-protobuf@3.4.0: The `apollo-reporting-protobuf` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/usage-reporting-protobuf` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated apollo-server-env@4.2.1: The `apollo-server-env` package is part of Apollo Server v2 and v3, which are now deprecated (end-of-life October 22nd 2023 and October 22nd 2024, respectively). This package's functionality is now found in the `@apollo/utils.fetcher` package. See https://www.apollographql.com/docs/apollo-server/previous-versions/ for more details.
npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws    For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
npm WARN deprecated vue@2.7.16: Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.

changed 857 packages in 2m

npm config list 查看npm的路径
PowerShell命令里面输入:

PS C:\Users\xx\Desktop> npm config list
; "builtin" config from E:\node_modules\npm\npmrc

prefix = "C:\\Users\\xx\\AppData\\Roaming\\npm"

找到prefix这一行复制路径——>鼠标左键点击此电脑(桌面有我的电脑也可以,没有随便去一个文件夹看左侧一个个找),点击属性,
高级设置,点击环境变量——》系统变量——》双击Path——》点击新建添加复制的路径
关闭PowerShell窗口再打开:输入vue -V命令
出现下方是被权限设置了

vue : 无法加载文件 C:\Users\XX\AppData\Roaming\npm\vue.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/g
o.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ vue -V
+ ~~~
    + CategoryInfo          : SecurityError: (:) [],PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

解决:
在电脑下方的搜索输入PowerShell点击管理员运行
1.输入 get-ExecutionPolicy
2.输入 set-ExecutionPolicy RemoteSigned ,选择 Y
3.输入get-ExecutionPolicy -List
4.关闭管理员运行的PowerShell窗口再之前出现错误的PowerShell窗口重新输入vue -V命令不用再安装脚本文章来源地址https://www.toymoban.com/news/detail-829969.html

到了这里,关于使用 npm install -g @vue/cli命令报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 如何解决npm install 的报错npm ERR! network request to http://registry.cnpmjs.org/vue-cli failed

    报错: 解决方法: npm ERR! network request to http://registry.cnpmjs.org/vue-cli failed, reason: getaddrinfo ENOTFOUND 这句话已经很明显的提示 http://registry.cnpmjs.org/vue-cli 请求失败了,但网上其他博客还是让代理这个路径。试了网上很多方法都没有用。最后执行了以下语句,执行成功 直接代理淘

    2024年02月04日
    浏览(58)
  • npm之报错:npm WARN deprecated @npmcli/move-file@2.0.1(一百五十九)

    1.报错: npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs 2.解决

    2024年02月11日
    浏览(34)
  • npm报错:npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

    一、前言 1,因为最近在b站学习vue框架,安装脚手架时想要配置npm淘宝镜像 npm config set registry https://registry.npm.taobao.org 时报错了,然后知道我没有安装node.js 2,node.js安装后,执行npm报错npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead. 3,百度了一些后,初

    2024年02月07日
    浏览(30)
  • npm install:npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not reco

    运行npm install报错:npm WARN deprecated core-js@2.6.12: core-js@3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade

    2024年02月16日
    浏览(36)
  • 【vue】npm install -g @vue/cli出现错误

    进行到npm install -g @vue/cli这一步出现错误,操作步骤如下: 1.先下载node.js 不知道有没有下载,可以在cmd输入 出现版本号则电脑已经有了node.js,没有的话去官网下一个,csdn有其他小伙伴给了下载方法 2.通过 win+s打开开始栏的搜索框,输入cmd,管理员身份运行 在cmd界面粘贴下

    2024年02月12日
    浏览(26)
  • 安装:【vue】npm install -g @vue/cli出现错误

    安装Vue脚手架,cli就是Command Line Interface 命令行接口  工具 进行到npm install -g @vue/cli这一步出现错误,操作步骤如下: 1.通过 win+s打开开始栏的搜索框,输入cmd, 管理员身份运行 2.先下载node.js 不知道有没有下载,可以在cmd输入 在cmd界面粘贴下面这句话,因为下载缓慢,所以

    2024年02月16日
    浏览(49)
  • npm install 报错 The package-lock.json file was created with an old version of npm, npm WARN o

    解决方法直接看3 博主在VScode中用 npm install 命令下载包时报错,错误如下 npm版本过高,解决方法见第如下,亲测有效可以解决。 1.在vscode终端中输入如下命令行(可直接复制粘贴) 2. 然后输入 检查npm版本会显示一个低版本的 npm 的版本号。 3.然后再进行npm install 的操作就不

    2024年02月13日
    浏览(43)
  • 2021-09-16 npm install @vue/cli 卡在了 reify:rxjs: timing reifyNode: node_modules/@vue/cli/node_modules

    ​随后产生报错 查了一堆东西,后来发现其主要原因在于npm镜像源的问题。安装完nodejs之后默认镜像源为 淘宝镜像源 使用npm命令或者nrm命令切换镜像源至npm官方镜像源即可 注:本人长期科学上网因此npm官方源速度和淘宝基本没差,如果没有科学上网手段的朋友可能需要另想

    2024年02月11日
    浏览(45)
  • vue npm install报错如何处理

    npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: eslint-plugin-vue@5.2.3 npm ERR! Found: eslint@6.8.0 npm ERR! node_modules/eslint npm ERR! peer eslint@\\\"= 1.6.0\\\" from @vue/cli-plugin-eslint@4.4.4 这个错误通常意味着在解析依赖关系时出现了问题,可能是由于版本不匹配或存在依赖冲突。

    2024年02月16日
    浏览(31)
  • 解决npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher

    环境 系统:centos 7 node :v18.16.1 npm:9.5.1 安装pm2 提示报错: 更新uuid 更新成功后,继续安装pm2,也会提示:npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. 其实是已经安装成功了 1、查找pm2的安装位置 find / -name pm2 2、增加pm2软链接 查看pm2版本 pm2 -v 即可

    2024年02月11日
    浏览(33)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包