Npm或Yarn“坑”集
1.拉取项目后,使用yarn进行安装操作,提示如下
An unexpected error occurred: "http://registry.cnpmjs.org/sortablejs: Hostname/IP does not match certificate's altnames: Host: registry.cnpmjs.org. is not in the cert's altnames: DNS:r.cnpmjs.org".
info If you think this is a bug, please open a bug report with the information provided in "D:\\work\\lvshe\\icps_pcweb\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentati
【解决方式:】
npm config set strict-ssl false//取消npm的https认证
yarn config set strict-ssl false//取消yarn的https认证
【原因说明:】先排查了下载依赖源的问题,后发现是因为下载配置证书的问题。尝试取消https的认证后,便成功进行 'yarn install'.
网友评论