[Vue warn]: Error in onLaunch hook (Promise/async): "Error: Cannot find module 'lodash.merge'
Require stack:
- D:\HBuilderX-project\rideshare\uni_modules\uni-id-pages\uniCloud\cloudfunctions\uni-id-co\common\utils.js"
(found in App.vue)(env: Windows,mp,1.06.2301160; lib: 2.31.0)
uni-id-co目录执行一下npm install会报很多错误
如下:
npm ERR! code ECONNREFUSED
npm ERR! syscall connect
npm ERR! errno ECONNREFUSED
npm ERR! FetchError: request to http://registry.npmjs.org/jsonwebtoken failed, reason: connect ECONNREFUSED 127.0.0.1:31181
npm ERR! at ClientRequest.<anonymous> (D:\node.js\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! at ClientRequest.emit (node:events:513:28)
npm ERR! at onerror (D:\node.js\node_modules\npm\node_modules\agent-base\dist\src\index.js:117:21)
npm ERR! at callbackError (D:\node.js\node_modules\npm\node_modules\agent-base\dist\src\index.js:136:17)
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR! FetchError: request to http://registry.npmjs.org/jsonwebtoken failed, reason: connect ECONNREFUSED 127.0.0.1:31181
npm ERR! at ClientRequest.<anonymous> (D:\node.js\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! at ClientRequest.emit (node:events:513:28)
npm ERR! at onerror (D:\node.js\node_modules\npm\node_modules\agent-base\dist\src\index.js:117:21)
npm ERR! at callbackError (D:\node.js\node_modules\npm\node_modules\agent-base\dist\src\index.js:136:17)
npm ERR! at processTicksAndRejections (node:internal/process/task_queues:96:5) {
npm ERR! code: 'ECONNREFUSED',
npm ERR! errno: 'ECONNREFUSED',
npm ERR! syscall: 'connect',
npm ERR! address: '127.0.0.1',
npm ERR! port: 31181,
npm ERR! type: 'system',
2 个回复
HRK_01
需要配置淘宝镜像源才可以下载
a***@jxmhqy.com
分析一下终端输出,发现错误的原因是淘宝镜像过期了,造成云函数uni-id-co的依赖不能从淘宝镜像下载到本地。解决方法就是换镜像 npm config set registry https://registry.npmmirror.com.
BingoH5
我有点好奇,就是这个云对象不是上传到云端进行依赖安装的吗?跟本地nodejs的npm有关系?
2024-03-11 14:23
c***@gmail.com
回复 5***@qq.com:看图片,这是在本地调试哦~
2024-03-15 01:18