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

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

2024-09-30 23:09:00 前端知识 前端哥 769 954 我要收藏

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 命令可能会减少错误。

转载请注明出处或者链接地址:https://www.qianduange.cn//article/18860.html
标签
评论
发布的文章

安装Nodejs后,npm无法使用

2024-11-30 11:11:38

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!