npm WARN deprecated vm2@3.9.19: The library contains critical security issues and should not be used for production! The maintenance of the project has been discontinued. Consider migr ating your code to isolated-vm. C:\Users\lizhiqing\AppData\Roaming\npm\cnpm -> C:\Users\lizhiqing\AppData\Roaming\npm\node_modules\cnpm\bin\cnpm npm WARN notsup Unsupported engine for cnpm@9.2.0: wanted: {"node":">= 14.18.0"} (current: {"node":"14.17.3","npm":"6.14.13"}) npm WARN notsup Not compatible with your version of node/npm: cnpm@9.2.0 npm WARN notsup Unsupported engine for npminstall@7.9.0: wanted: {"node":">=14.18.0"} (current: {"node":"14.17.3","npm":"6.14.13"}) npm WARN notsup Not compatible with your version of node/npm: npminstall@7.9.0 npm WARN notsup Unsupported engine for urllib@3.17.1: wanted: {"node":">= 14.19.3"} (current: {"node":"14.17.3","npm":"6.14.13"}) npm WARN notsup Not compatible with your version of node/npm: urllib@3.17.1
时间: 2023-07-29 09:12:55 浏览: 210
这些警告是由 npm 给出的,它们表示你的项目中使用了一些已经停止维护的库或者有安全问题的库。警告信息中建议你迁移到其他替代库,例如 isolated-vm。同时,还有一些库指定了不兼容的 Node.js 版本范围。
如果你在生产环境中使用这些库,你应该考虑替换它们以避免潜在的安全风险。你可以尝试找到替代库,并修改你的代码以适应新的库。此外,你还可以更新你的 Node.js 版本以满足这些库的要求。
如果你对具体的库有更多疑问或需要进一步帮助,请提供更多相关信息,我会尽力帮助你解决问题。
相关问题
我已经安装了cnpm但是还是抱错(base) PS D:\Nodejs> npm install -g cnpm --registry=https://registry.npm.taobao.org --force npm WARN using --force Recommended protections disabled. npm WARN deprecated vm2@3.9.19: The library contains critical security issues and should not be used for production! The maintenance of the project has been discontinued. Consider migrating your code to isolated-vm. changed 466 packages in 14s 28 packages are looking for funding run `npm fund` for details (base) PS D:\Nodejs> cnpm -v cnpm : 无法将“cnpm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确 ,然后再试一次。 所在位置 行:1 字符: 1 + cnpm -v + ~~~~ + CategoryInfo : ObjectNotFound: (cnpm:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
看起来您已经成功安装了cnpm,但是在运行cnpm命令时遇到了问题。根据您提供的错误信息,似乎系统无法识别cnpm命令。
这可能是由于系统环境变量配置不正确导致的。您可以尝试以下解决方法:
- 确保您已经正确安装了cnpm。重新运行以下命令来安装cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org --force
检查您的系统环境变量是否包含npm全局安装目录。在Windows上,您可以按照以下步骤操作:
- 打开控制面板,进入"系统与安全" -> "系统" -> "高级系统设置"。
- 在弹出的窗口中,点击"环境变量"按钮。
- 在"系统变量"部分,找到名为"Path"的变量,并编辑它。
- 确保其中包含npm全局安装目录的路径,例如:"C:\Users\YourUsername\AppData\Roaming\npm"。
- 如果路径不存在,请添加它,并保存更改。
重新启动命令提示符或终端窗口,并尝试运行cnpm命令:
cnpm -v
如果问题仍然存在,请确保您在安装过程中没有遇到任何错误,并且尝试重新安装cnpm。
希望这可以帮助您解决问题。如果问题仍然存在,请提供更多详细信息,以便我能够更好地帮助您。
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained npm WARN deprecated eslint-loader@2.2.1: This loader has been deprecated. Please use eslint-webpack-plugin npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated html-webpack-plugin@3.2.0: 3.x is no longer supported npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address' 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 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 svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x. 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 your dependencies to the actual version of core-js. added 1400 packages in 1m
同样,这不是一个问题,而是一堆 npm 的警告信息。这些警告信息是告诉你使用的一些库已经被废弃了,建议你更新或者替换掉这些库。比如:
stable
库已经被废弃,因为现代的 JavaScript 已经保证了Array#sort()
是一个稳定的排序。source-map-url
库已经被废弃,建议使用其他替代库。@hapi/bourne
和@hapi/topo
库已经被废弃,建议升级到新版本的@hapi
库。eslint-loader
库已经被废弃,建议使用eslint-webpack-plugin
。chokidar
库已经被废弃,建议升级到新版本的chokidar
库。html-webpack-plugin
库的 3.x 版本已经不再支持,建议升级到新版本的库。uuid
库的旧版本可能在某些情况下使用Math.random()
,存在问题,建议升级到新版本的库。
还有其他的警告信息也是类似的,建议你根据警告信息逐一解决这些问题。
相关推荐
















