我使用express coserver命令安装了一个快速服务器,然后使用.npm install‘命令安装其他节点包/依赖项,但我得到了以下结果:
=== npm audit security report ===
Manual Review
Some vulnerabilities require your attention to resolve
Visit https://go.npm.me/audit-guide for additional guidance
Low Incorrect Handling of Non-Boolean Comparisons During
Minification
Package uglify-js
Patched in >= 2.4.24
Dependency of jade
Path jade > transformers > uglify-js
More info https://nodesecurity.io/advisories/39
Low Regular Expression Denial of Service
Package uglify-js
Patched in >=2.6.0
Dependency of jade
Path jade > transformers > uglify-js
More info https://nodesecurity.io/advisories/48
Critical Sandbox Bypass Leading to Arbitrary Code Execution
Package constantinople
Patched in >=3.1.1
Dependency of jade
Path jade > constantinople
More info https://nodesecurity.io/advisories/568
Low Regular Expression Denial of Service
Package clean-css
Patched in >=4.1.11
Dependency of jade
Path jade > clean-css
More info https://nodesecurity.io/advisories/785
found 4 vulnerabilities (3 low, 1 critical) in 194 scanned packages
4 vulnerabilities require manual review. See the full report for details.我的node --version是v10.15.0,express --version是4.16.1,我使用的是Windows 10。我不知道这里是否需要其他信息,但如果需要,请告诉我。
发布于 2020-09-04 06:00:04
原因:翡翠已改名为帕格,请安装最新版本的帕格而不是翡翠。
修正:
发布于 2020-05-10 14:07:58
当问题发生时,
您可能使用快速应用生成器创建了骨架网站。当创建应用程序而不指定要使用哪个视图引擎时,就会遇到这个问题。express <appname>将下面的包安装为依赖项(在撰写本文时),问题是‘post’包的问题。“翡翠”是快递工具的默认视图引擎,但' jade‘被重新命名为'pug',而现在的玉石是废弃的。
"cookie-parser": "~1.4.4",
"debug": "~2.6.9",
"express": "~4.16.1",
"http-errors": "~1.6.3",
"jade": "~1.11.0",
"morgan": "~1.9.1"如何修复
使用“pug”(改名为玉)作为视图引擎
express myapp --view=pug如果'pug‘具有较低的严重漏洞,请尝试
npm audit fix生成没有视图引擎的应用程序
exprees myapp --no-view有关“翡翠”包的更多信息:https://www.npmjs.com/package/jade
发布于 2020-04-25 20:08:48
当我试图使用npx express-generator myapp命令安装Express时,也遇到了同样的错误。
为解决此错误,采取了以下步骤:
npm install抛出了一个低严重漏洞,随后由npm audit fix修复。https://stackoverflow.com/questions/57923270
复制相似问题