简体   繁体   中英

npx create-react-app my-app ERORR: rollbackFailedOptional

The command create-react-app my-app worked fine for the last week that I have been using it and now it is returning the error "rollbackFailedOptional: verb npm-session 895a42364389108b".

I already tried

npm config rm proxy
npm config rm https-proxy
npm config set registry http://registry.npmjs.org/

I am still getting the same error.

Edit:

after letting it fail completely it says the following:

npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to http://registry.npmjs.org/create-react-app failed, reason: getaddrinfo ENOTFOUND domain
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\caleb\AppData\Roaming\npm-cache\_logs\2020-06-05T19_30_34_621Z-debug.log

I figured it out. I did

npm config get proxy

it returned null

So I had to go to "C:\Users\Myname.npmrc", open it in a notepad and then delete whats in there and add

proxy=http://yourorganizationproxy.com:8080
https-proxy=http://yourorganizationproxy.com:8080

As Caleb indicates you should go to "C:\Users\<user>" and check for.npmrc file, then edit with any notepad app. Then you should

  • Delete everything
  • Add:
 proxy=http://yourorganizationproxy.com:8080 https-proxy=http://yourorganizationproxy.com:8080 strict-ssl=false
  • Save

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM