先上问题:
own up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. npm ERR! code ENOTFOUND npm ERR! syscall getaddrinfo npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.nlark.com/json2mq/download/json2mq-0.2.0.tgz failed, reason: getaddrinfo ENOTFOUND registry.nlark.com npm ERR! network This is a problem related to network connectivity. npm ERR! network In most cases you are behind a proxy or have bad network settings. npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. See: 'npm help config' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\admin\AppData\Local\npm-cache\_logs\2024-08-14T03_15_14_029Z-debug-0.log
最开始是接受一个老项目时出现的问题,当我将项目上传到gitee上面的时候,我使用npm i去下载直接报错。
第一次解决,以为是镜像问题(在两个镜像中疯狂切换)
第二次解决,修改packge-lock.json中的地址(更新了一个地址)
第三次解决,使用我每改一个就会有下一个nlark.com的报错,所以直接全选所有nlark.com的地址,全部替换为npmjs
最终结论
https://registry.nlark.com/ 这个已经无法访问了,所以要更新下链接,需要更新下 package-lock.json 的地址,指向https://registry.npmjs.org