React 项目启动报错:
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning UNABLE_TO_VERIFY_LEAF_SIGNATURE: request to https://registry.npmjs.org/node-sass failed, reason: unable to verify the firs
t certificate
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/jquery failed, reason: unable to verify the first certificate
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-07-18T16_08_08_647Z-debug.log
这是因为https的签名问题造成的,关了就可以了。
npm config set strict-ssl false
本文详细解析了React项目启动时遇到的npm错误,主要涉及https签名验证问题导致的请求失败,提供了通过设置npm配置禁用严格SSL验证的解决方案。
1万+

被折叠的 条评论
为什么被折叠?



