亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

? ? ????? ????? Q&A npm React ?? ? ??? ???? ??? ?? ????

npm React ?? ? ??? ???? ??? ?? ????

Dec 27, 2022 am 11:25 AM
react npm

npm react安裝報錯的解決辦法:1、打開項目中的“package.json”文件,找到dependencies對象;2、將其中的“react.json”移動到“devDependencies”;3、在終端中運行“npm audit --production”即可修復(fù)警告。

npm React ?? ? ??? ???? ??? ?? ????

本教程操作環(huán)境:Windows10系統(tǒng)、react18.0.0版、Dell G3電腦。

npm react 安裝報錯怎么辦?

npm安裝react時提示報錯

在使用npx create-react-app的安裝過程中出現(xiàn)了

6 high severity vulnerabilities

但是后續(xù)仍然顯示成功安裝,按照提示輸入npm-audit時候卻報錯

 npm audit fix
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
 
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\christine\AppData\Local\npm-cache\_logs\2022-10-10T08_34_39_142Z-debug-0.log

后續(xù)發(fā)現(xiàn)是自己把項目的路徑輸錯了,正確輸入項目路徑時顯示提示漏洞的原因

nth-check  <2.0.1
Severity: high
Inefficient Regular Expression Complexity in nth-check - https://github.com/advisories/GHSA-rp65-9cf3-cjxr
fix available via `npm audit fix --force`
Will install react-scripts@2.1.3, which is a breaking change
node_modules/svgo/node_modules/nth-check
  css-select  <=3.1.0
  Depends on vulnerable versions of nth-check
  node_modules/svgo/node_modules/css-select
    svgo  1.0.0 - 1.3.2
    Depends on vulnerable versions of css-select
    node_modules/svgo
      @svgr/plugin-svgo  <=5.5.0
      Depends on vulnerable versions of svgo
      node_modules/@svgr/plugin-svgo
        @svgr/webpack  4.0.0 - 5.5.0
        Depends on vulnerable versions of @svgr/plugin-svgo
        node_modules/@svgr/webpack
          react-scripts  >=2.1.4
          Depends on vulnerable versions of @svgr/webpack
          node_modules/react-scripts
 
6 high severity vulnerabilities

一個建議:忽略

npm提示可以使用`npm audit fix --force`進(jìn)行修復(fù),但是Don't be alarmed by vulnerabilities after NPM Install (voitanos.io)j

建議是忽略這些錯誤;因為npm只是包管理工具,他不能夠解決包自身的缺陷和漏洞,如果強制修復(fù)解決的話,很有可能會引起更為嚴(yán)重的錯誤。

一定要嘗試解決的話

打開項目中的package.json文件,找到dependencies對象

"dependencies":{
//……}

將其中的react.json移動到devDependencies(沒有的話可以自己創(chuàng)建一個),你的版本可能與我的不同,但是這是無關(guān)緊要的,只需要移動即可

"devDependencies": {
    "react-scripts": "5.0.1"
  },

最后,在終端中運行npm audit --production,即可修復(fù)警告

推薦學(xué)習(xí):《react視頻教程

? ??? npm React ?? ? ??? ???? ??? ?? ????? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1597
29
PHP ????
1488
72
???
React vs. Vue : Netflix? ?? ??? ??? ?????? React vs. Vue : Netflix? ?? ??? ??? ?????? Apr 14, 2025 am 12:19 AM

NetflixusesAcustomFrameworkCalled "Gibbon"BuiltonReact, NotreactorVuedirectly.1) TeamExperience : 2) ProjectComplexity : vueforsimplerProjects, 3) CustomizationNeeds : reactoffersmoreflex.4)

React? ??? : ?????, ?? ? ?? ?? React? ??? : ?????, ?? ? ?? ?? Apr 18, 2025 am 12:23 AM

React Ecosystem?? ??? ?? ????? (? : Redux), ??? ????? (? : Reactrouter), UI ?? ?? ????? (? : ?? -UI), ??? ?? (? : Jest) ? Webpack? ?? ?? ?? (? : Webpack)? ?????. ??? ??? ???? ??????? ????? ???? ???? ?? ?? ? ?? ???? ???? ? ??? ?? ?????.

Netflix? ??? ?? : React (?? VUE)? ?? ?? ???? Netflix? ??? ?? : React (?? VUE)? ?? ?? ???? Apr 16, 2025 am 12:08 AM

Netflix? React? ??? ?? ??? ??? ?????. 1) React? ?? ??? ? ?? ??? ??? ???? Netflix? ??? ?? ?????. 2) ?? ???? ?? Netflix? ??? ?????? ??? ????, ?? ?? ? ??? ??? ?? ?? ??? ??? ?????. 3) React? ?? DOM ? ?? ?? ????? ??? ??? ? ??? ?? ?? ??? ??????.

React : ? ????? JavaScript ?????? ? React : ? ????? JavaScript ?????? ? Apr 18, 2025 am 12:25 AM

React? Meta? ??? ?????? ???? ?? ?? ? JavaScript ??????? ??? ?? ?? ?? ? ?? DOM ?????. 1. ?? ?? ? ?? ?? : React? ?? ?? (?? ?? ???) ? ?? (? : usestate)? ?? ??? ???? ?? ??? ? ?? ??? ?????. 2. ?? DOM ? ?? ??? : ?? DOM? ?? ?? DOM? ????? ?????? ??? ??????. 3. ???? ? ?? : ?? (? : ???) ?? ?? ??? ????? ???? ??? ??? ?? ? ? ??????. 4. ?? ? : ?? Helloworld ?? ???? ?? ??? ? ?? (Usecontext ?

React? ?? : ? ??? ???? ?? React? ?? : ? ??? ???? ?? Apr 19, 2025 am 12:22 AM

React? ??? ??? ? ?? ?? ??, ?? ??? ? ?? ?? ???? ?? ??? ??? ? ????. 1) RECT? ?? ??? ?? ? ??? ?? ????? ??? ? ?? ?? ??? ?????. 2) ?? ???? ?? ??? ?? ?????? ??????. 3) React? ?? ??? ????? ?? GraphQL ? TypeScript? ?? ??? ?? ?? ? ????.

React? ?? ??? ?? ?? : ?? ? ?? React? ?? ??? ?? ?? : ?? ? ?? Apr 17, 2025 am 12:25 AM

React? ??? ???? ?????, ?? ??? ?? ?????. 1) ?? ?? ?? ??? ?? ??? ?? ??????. 2) ?? DOM ??? ?? ??? ??? ????? ?? ? ? ??? ??????. 3) ??? ???? ?? ?? ?????? ??? ?????. React? ??? ???? ????? ?????? ?? ??? ?? ??? ????? ????? ?? ?? ??? ??? ?????? ?? ? ? ????.

React vs. ??? ??? ?? : ?? React vs. ??? ??? ?? : ?? Apr 13, 2025 am 12:06 AM

React? ??? ?????? ?????? ??? ?? ??? ?????. ??? ??? ??? ?? ? ?? ????? ???? ? ?????. React? ?? ? ???? UI ????? ???? ??? ??? ??? ??? ??? ??? ???? ?????. ?? ??, ???? ?? ??, ? ?? ? ?? ?? ??? ?? ???????.

React? ?? ?? ?? : ??? ?? ?? React? ?? ?? ?? : ??? ?? ?? Apr 18, 2025 am 12:15 AM

React? ?? ???? ?? ??? ??, ?? ?? ? ?? DOM? ?????. 1) ?? ???? ?? ????? ?? UI? ??? ??? ???? ??? ?? ?? ???? ?? ?? ???? ??????. 2) ?? ??? ?? ? ??? ?? ?? ???? ???? ?? UI ????? ??????. 3) ?? DOM ??? ??, ????? DOM ??? ?? ??? ???? UI? ????????.

See all articles