安装vue-cli 3.x脚手架中存在的错误npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks me

npm WARN deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

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 rimraf@2.6.3: Rimraf versions prior to v4 are no longer supported

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 rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported

npm WARN deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported

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-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 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 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.

在这里插入图片描述

这里网上说的错误有好多种,这里简单列举两种,简单总结一下,我的是第二个原因:

1、你没有配置vue的环境变量,可参考该文章-> npm安装vue@cli报错的简单处理方式
2、一开始是用:npm install -g @vue/cli 这个装的,因为用 npm:作为官方的包管理器,npm提供了对Node.js模块的安装、更新和管理等功能。但是,对于国内用户来说,直接使用npm可能会遇到下载速度慢和连接不稳定的问题,因为它的默认源是国外的服务器。所以可能有的包,有的依赖没有下载下来,就导致报错;
后面用 npm uninstall -g @vue/cli 命令卸载全局 Vue CLI 脚手架,再用 cnpm install -g @vue/cli 重新安装即可。
不清楚 npm 和 cnpm 区别的可参考 npm和cnpm有什么区别? 这篇文章
如何安装 Node.js 、如何安装脚手架、如何安装 cnpm、如何改淘宝镜像,可参考 Vue3安装配置、开发环境搭建(组件安装卸载)(图文详细)

所以综上所述,为了减少错误,先安装 cnpm 和 改淘宝镜像,后面安装的时候一律用 cnpm 命令可能会减少错误。

  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 这是一些npm警告信息,它们表示某些库已经不再得到支持,需要升级到更高版本,否则可能会出现问题。其包括har-validator、uuid、request和coffee-script等库,还有vue-cli也已经被弃用,建议使用@vue/cli代替。 ### 回答2: 这是一些npmdeprecated警告,它们意味着一些npm包的版本已经过时,建议更新到最新的版本来避免使用不再被支持的功能或存在安全漏洞。 第一个警告是关于har-validator,它已经不再被支持,因此建议使用其他的验证器。 第二个警告是关于uuid,建议更新到7版本或更高版本,因为较旧的版本使用了math.random(),这可能会出现不稳定的情况。具体可以访问https://v8.dev/blog/math-random了解详情。 第三个警告是关于request,在2.88.2版本之后已被弃用,建议使用其他的请求包。具体可以参考https://github.com/request/request/issues/3142了解更多信息。 第四个警告是关于coffee-script,在1.12.7版本之后已被弃用,建议使用没有hyphen的"coffeescript"包。 第五个警告是关于vue-cli,在2.9.6版本之后已经弃用,建议使用新的@vue/cli包。 在使用npm包时,及时更新到最新版本可以避免出现一些已知的问题和漏洞,保证代码的稳定性和安全性。 ### 回答3: 这些错误提示表示了一些 npm 包已经过时或存在问题,需要更新或换用其他包。其,har-validator@5.1.5 这个包不再受支持,建议升级到更高版本的包;uuid@3.4.0 这个包虽然也有新版本,但更重要的是提示了该包的旧版本在某些情况下可能会使用 math.random(),而这种方法已知存在问题,建议详细查看 https://v8.dev/blog/math-random;request@2.88.2 这个包也已经被弃用,建议查看其替代方案;coffee-script@1.12.7 这个包已经更名为 "coffeescript",请注意修改依赖;最后,vue-cli@2.9.6 这个包已经被 @vue/cli 替代,建议升级。 以上的错误提示是 npm 经常出现的情况,也是开发者需要关注的重要信息。在使用过程,需要时刻留意依赖包的新版本和变化,以保证项目的稳定性和安全性。建议查看官方文档和社区讨论,及时更新和调整依赖;另外,还可以使用工具来辅助管理依赖,如 Yarn、pnpm 等。最终目标是保持项目的可靠性和持续迭代。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值