npm 错误!代码 UNABLE_TO_GET_ISSUER_CERT_LOCALLY [英] npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY

查看:39
本文介绍了npm 错误!代码 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/  

这很完美,我收到了一条成功消息Happy Hacking!,因为没有将 strict-ssl 标志设置为 false.

this worked perfectly and I got a success message Happy Hacking! by not setting the strict-ssl flag to false.

这篇关于npm 错误!代码 UNABLE_TO_GET_ISSUER_CERT_LOCALLY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆