安装 axios 安装包时 出现的错误

来源:3-10 优化接口请求方式及数据批量插入

慕田峪8555410

2021-02-25

图片描述
老师 您好 在安装 axios 安装包时 出现下边的错误 有影响吗

写回答

1回答

谢成

2021-02-26

1、先清楚下npm缓存

npm cache clean --force

2、删除该云函数下的package-lock.json

3、再重新安装试试

0
1
慕田峪8555410
老师 还是会报错 PS D:\designend\cloudfunctions\getPlaylist> npm cache clean --force npm WARN using --force I sure hope you know what you are doing. PS D:\designend\cloudfunctions\getPlaylist> npm install axios npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/axios failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org 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\86158\AppData\Roaming\npm-cache\_logs\2021-02-26T09_24_56_713Z-debug.log
2021-02-26
共1条回复

微信小程序云开发-从0打造云音乐全栈小程序

横跨小程序端、云后端、CMS一站式云开发的小程序全栈课程

1938 学习 · 2768 问题

查看课程