所以我是編碼新手,想重新編碼一個程式,但為此我需要讓程式運行才能理解它。但是,當我在 cmd 中運行 npm install 時會彈出
up to date, audited 364 packages in 1s
16 packages are looking for funding
run `npm fund` for details
5 moderate severity vulnerabilities
To address all issues, run:
npm audit fix
Run `npm audit` for details.
我嘗試了所有方法但無法使其正常作業(npm 審核修復不起作用)我需要更新這些軟體包嗎?npm 基金:
Program@1.0.0
-- https://github.com/chalk/chalk?sponsor=1
| | `-- [email protected]
| `-- https://github.com/chalk/ansi-styles?sponsor=1
| `-- [email protected]
-- https://github.com/sponsors/isaacs
| `-- glob@7.2.0, rimraf@3.0.2, json-stringify-nice@1.1.4, promise-all-reject-late@1.0.1, promise-call-limit@1.0.1
-- https://github.com/sponsors/sindresorhus
| `-- [email protected], [email protected], [email protected]
-- https://github.com/sponsors/ljharb
| `-- is-core-module@2.7.0
-- https://github.com/sponsors/feross
| `-- [email protected], [email protected], [email protected], [email protected]
`-- https://github.com/sponsors/epoberezkin
`-- [email protected]
使用審計修復 --force 時會發生這種情況
C:\Users\pepar\Desktop\program>npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm WARN audit fix json-schema@0.2.3 node_modules/npm/node_modules/json-schema
npm WARN audit fix json-schema@0.2.3 is a bundled dependency of
npm WARN audit fix json-schema@0.2.3 npm@7.24.2 at node_modules/npm
npm WARN audit fix json-schema@0.2.3 It cannot be fixed automatically.
npm WARN audit fix json-schema@0.2.3 Check for updates to the npm package.
npm WARN audit fix ansi-regex@5.0.0 node_modules/npm/node_modules/cli-table3/node_modules/ansi-regex
npm WARN audit fix ansi-regex@5.0.0 is a bundled dependency of
npm WARN audit fix ansi-regex@5.0.0 npm@7.24.2 at node_modules/npm
npm WARN audit fix ansi-regex@5.0.0 It cannot be fixed automatically.
npm WARN audit fix ansi-regex@5.0.0 Check for updates to the npm package.
npm WARN audit fix ansi-regex@3.0.0 node_modules/npm/node_modules/string-width/node_modules/ansi-regex
npm WARN audit fix ansi-regex@3.0.0 is a bundled dependency of
npm WARN audit fix ansi-regex@3.0.0 npm@7.24.2 at node_modules/npm
npm WARN audit fix ansi-regex@3.0.0 It cannot be fixed automatically.
npm WARN audit fix ansi-regex@3.0.0 Check for updates to the npm package.
npm WARN audit fix jsprim@1.4.1 node_modules/npm/node_modules/jsprim
npm WARN audit fix jsprim@1.4.1 is a bundled dependency of
npm WARN audit fix jsprim@1.4.1 npm@7.24.2 at node_modules/npm
npm WARN audit fix jsprim@1.4.1 It cannot be fixed automatically.
npm WARN audit fix jsprim@1.4.1 Check for updates to the npm package.
npm WARN audit fix strip-ansi@4.0.0 node_modules/npm/node_modules/string-width/node_modules/strip-ansi
npm WARN audit fix strip-ansi@4.0.0 is a bundled dependency of
npm WARN audit fix strip-ansi@4.0.0 npm@7.24.2 at node_modules/npm
npm WARN audit fix strip-ansi@4.0.0 It cannot be fixed automatically.
npm WARN audit fix strip-ansi@4.0.0 Check for updates to the npm package.
npm WARN audit fix string-width@2.1.1 node_modules/npm/node_modules/string-width
npm WARN audit fix string-width@2.1.1 is a bundled dependency of
npm WARN audit fix string-width@2.1.1 npm@7.24.2 at node_modules/npm
npm WARN audit fix string-width@2.1.1 It cannot be fixed automatically.
npm WARN audit fix string-width@2.1.1 Check for updates to the npm package.
up to date, audited 364 packages in 2s
16 packages are looking for funding
run `npm fund` for details
# npm audit report
ansi-regex >2.1.1 <5.0.1
Severity: moderate
Inefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw
fix available via `npm audit fix`
node_modules/npm/node_modules/cli-table3/node_modules/ansi-regex
node_modules/npm/node_modules/string-width/node_modules/ansi-regex
strip-ansi 4.0.0 - 5.2.0
Depends on vulnerable versions of ansi-regex
node_modules/npm/node_modules/string-width/node_modules/strip-ansi
string-width 2.1.0 - 4.1.0
Depends on vulnerable versions of strip-ansi
node_modules/npm/node_modules/string-width
json-schema <0.4.0
Severity: moderate
json-schema is vulnerable to Prototype Pollution - https://github.com/advisories/GHSA-896r-f27r-55mw
fix available via `npm audit fix`
node_modules/npm/node_modules/json-schema
jsprim 0.3.0 - 1.4.1 || 2.0.0 - 2.0.1
Depends on vulnerable versions of json-schema
node_modules/npm/node_modules/jsprim
5 moderate severity vulnerabilities
To address all issues, run:
npm audit fix
uj5u.com熱心網友回復:
這里發生的一切都很好。
您看到的訊息不是錯誤,是正常的。他們只是警告您某些依賴項(和依賴項的依賴項)存在已報告的漏洞問題,并且運行該命令npm audit fix --force只會應用通過升級這些包而發布的修復程式。
它警告您的原因是讓您知道某些軟體包現在安裝了較新的版本,并且如果最新版本引入了一個錯誤,它可能會(極少發生,我從未發生過)破壞某些東西。
還有一些打包不能自動修復,錯誤資訊中說明了原因。
uj5u.com熱心網友回復:
首先,您需要使用npm update --save/--save-dev -f. 然后,發出以下命令:npm audit fix --force
您可以在此處找到有關審計的更多資訊
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/378847.html
