npm ERR!代码UNABLE_TO_GET_ISSUER_CERT_LOCALLY [英] npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
问题描述
我正在尝试创建React应用程序的所有方法.我已经尝试过使用Maven,现在我正在尝试使用来自Facebook Incubators的crate-react-app构建系统.
I am trying all the ways of creating react application. I have tried with maven and now i am trying with crate-react-app build system from Facebook Incubators.
当我尝试在npm环境中运行命令create-react-app my-app
时,它可以在我的个人系统上正常运行.但是,当我在工作环境中尝试相同的命令时,在命令提示符下遇到此错误
When i tried to run the command create-react-app my-app
in npm environment, it worked on my personal system with no issues. But when i tried the same command in my work environment, i have encountered with this error on command prompt
npm ERR! node v6.10.2
npm ERR! npm v3.10.10
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! unable to get local issuer certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
推荐答案
npm config set strict-ssl false
是互联网搜索的一种快速解决方案,幸运的是它可以工作.但是,作为我工作环境的一部分,我只能将strict-ssl标志设置为false.
A quick solution from the internet search was npm config set strict-ssl false
, luckily it worked. But as a part of my work environment, I am restricted to set the strict-ssl flag to false.
后来我找到了一个安全有效的解决方案,
Later I found a safe and working solution,
npm config set registry http://registry.npmjs.org/
这很好用,并且我没有将strict-ssl标志设置为false,因此收到了成功消息Happy Hacking!
.
this worked perfectly and I got a success message Happy Hacking!
by not setting the strict-ssl flag to false.
这篇关于npm ERR!代码UNABLE_TO_GET_ISSUER_CERT_LOCALLY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!