When I try npm install
new packages it shows me this error:
<rollbackFailedOptional: verb npm-session 585aaecfe5f9a82
Try this
npm config rm proxy
npm config rm https-proxy
The cause for this might be your current NPM registry. Try to check for a .npmrc file. These can be at various locations:
/path/to/my/project/.npmrc
)~/.npmrc
)$PREFIX/etc/npmrc
)/path/to/npm/npmrc
)Within these there can be something like
registry=https://mycustomregistry.example.org
which will take priority over the default one (http://registry.npmjs.org/
). You can delete this line in the file or use the default registry like that:
npm <command> --registry http://registry.npmjs.org/
Mine was due to McAfee firewall. It is set to Ask mode, so should have popped up a prompt to ask for internet connection, but it didn't! Going into McAfee and (temporarily!) disabling the firewall allowed me to install.
Hi I'm also new to react and I also faced this problem after so many trouble I found solution: Just run in your command prompt or terminal :
npm config set registry http://registry.npmjs.org/
This will resolve your problem. Reference link: http://blog.csdn.net/zhalcie2011/article/details/78726679
I had the same effect creating a react app with PhpStorm. And then at the end it just says done
. Running the same command in the terminal gave me detailed errors. The project folder I've created was named react
which seems to be a no-go.
Make sure your project folder is not named react
.
Solution: The default value of ‘proxy’ and ‘https-proxy’ key of npm config is NULL. After doing some more R & D then I tried to set the proxy setting value to above key (this solution works in my scenario).
Also, the same proxy settings need to be applied in IE browser Internet Settings >> Settings >> LAN settings.
Conclusion: In corporate/some environment the proxy is a somewhat mandatory setting otherwise npm install will not work.
Issue on GitHub: https://github.com/SharePoint/sp-dev-docs/issues/3266
You can refer blog for detailed information https://blogs2share.blogspot.com/2019/01/spfx-environment-setup-error.html