npx create-react-app your-app-name
May be this will help someone in need. I turned to this solution after wasting good 2 hours as my corporate proxy server on work laptop was not getting resolved..!
I removed both proxy
and https-proxy
from .npmrc
file and set only
npm config set registry http://registry.npmjs.org/
Then, I am able to successfully run npm install -g create-react-app
.npmrc
file can be found here at C:\Users\<userName>\.npmrc
Cheers! Happy Quarantine Development :p
We faced similar issue recently and our requirement was to use public npm registry for one feature and private registry for another feature. So for private registry npm needs to go via proxy but for public registry we don't need proxy so we created .npmrc
file inside our project and added two config variables:
registry
and noproxy
where noproxy
points to the public domain of the registry. This will make sure to skip the proxy config from your global npmrc file.
We happened to run into this error message because in our setup, the Maven Nexus NPM Repository ran on the same machine and we therefore first used http://localhost/xyz/
as the NPM repository URL.
For whatever reason, localhost
was treated as a system-type NPM registry, causing errors.
Changing the NPM repository URL configuration to the computer's hostname, e.g. http://mycomputer.company.intra/xyz/
fixed the issue.
What fixed it for me, was to enable SMB 1.0 in Window's Control Panel on my development PC as follows:
Control Panel > Programs and Features > Turn Windows features on or off > SMB 1.0
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.