首页 > 解决方案 > 如何修复错误“错误“npm WARN 已过期 json3@3.3.2:请使用您自己的 JSON 对象而不是 JSON 3”

问题描述

我想在 Windows 上测试应用程序。链接到应用程序 - github.com - Leinox/GanttManager

我在做:
1. 启动控制台:c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Node.js\Node.js, command line.lnk
2. 进入项目所在的文件夹cd c:\test\visualStudio\1485\fl\
3. npm install.

在屏幕上查看结果。 在此处输入图像描述

结果文本:

In your environment, use of Node.js 12.6.0 (x64) and npm is configured.
C:\Users\admin> cd c:\test\visualStudio\1485\fl \
c:\test\visualStudio\1485\fl> npm install
npm WARN is deprecated json3@3.3.2: please use your own JSON object instead of JSON 3
The npm notification created by lockfile as package-lock.json. You must fix this file.

93 packages from 342 participants are added and 472 packages for 46.319 are checked with
46 vulnerabilities found (18 weak, 17 medium, 10 high, 1 critical)
run `npm audit fix` to correct them, or` npm audit` for details
c:\test\visualStudio\1485\fl>

问题
1. 如何修复错误npm WARN is obsolete json3@3.3.2: please use your own JSON object instead of JSON 3
2. 是npm WARN problem now outdated json3@3.3.2: please use your own JSON object instead of JSON 3问题还是应用程序在不删除此注释的情况下可以工作?

标签: javascriptnode.js

解决方案


如何修复错误

请参阅JSON3 文档,其中说:

未维护的JSON
3 已弃用不再维护。请不要在新项目中使用它,并迁移现有项目以使用本机JSON.parse代替JSON.stringify


应用程序是否可以在不删除此注释的情况下工作?

大概。


推荐阅读