NodeJS React npm warn deprecates如何处理?

wz8daaqr  于 2023-06-22  发布在  Node.js
关注(0)|答案(4)|浏览(263)
npm WARN deprecated flatten@1.0.3: flatten is deprecated in favor of utility frameworks such as lodash.
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
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 querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated sane@4.1.0: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
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.
tps://v8.dev/blog/math-random for details.
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 core-js@2.6.12: core-js@<3.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. Please, upgrade your dependencies to the actual version of core-js.
deyfvvtc

deyfvvtc1#

我也遇到过类似的问题。只需使用以下命令更新npm的版本:

npm install -g npm
zfycwa2u

zfycwa2u2#

这些警告来自您在package.json中使用的库。有两种类型的库:
1.直接库:您直接列出了它
1.传递库:通过使用其他库安装的
所以你要做的是:
运行npm list --depth=3(如果没有找到,则增加深度)并跟踪库的来源,一旦找到,您有2个选择:
1.升级它,它大多数情况下,它的工作
1.删除它,并使用另一个具有最新版本的传递库

lhcgjxsq

lhcgjxsq3#

1.运行npm ls package_name@version,所以在您的情况下,第一个包
npm ls flatten@1.0.3
1.您将获得其安装的源。类似这样的东西(例如)

│ │   └─┬ webpack@4.46.0
 │ │     └─┬ node-libs-browser@2.2.1
 │ │       └─┬ url@0.11.0
 │ │         └── flatten@1.0.3

1.因此,如果是直接安装,您可以简单地从https://www.npmjs.com找到较新的版本。直接在package.json中更新版本,删除node_modules文件夹,然后运行npm i
1.如果不是直接安装,您可以尝试以类似的方式更新父软件包,并查看它是否包含所需软件包的更新版本。在package.json中更新父包版本后,如果它包含过期包的更新版本,则不会在终端中收到错误消息。
这将解决错误消息。

fumotvh3

fumotvh34#

试试看
npm i -g

删除当前版本的node并重新安装最新的稳定版本。
这两个都应该起作用。

相关问题