连接本地云函数运行
x007xyz
- 发布:2022-10-09 17:50
- 更新:2023-05-10 15:40
- 阅读:323
产品分类: uniCloud/App
操作步骤:
预期结果:
正常
正常
实际结果:
报错
报错
bug描述:
连接云函数本地运行就会报错,连接云端函数正常
17:46:06.238 [本地调试]internal/modules/cjs/loader.js:818
17:46:06.244 [本地调试] throw err;
17:46:06.245 [本地调试] ^
17:46:06.250 [本地调试]
17:46:06.255 [本地调试]Error: Cannot find module 'lodash.merge'
17:46:06.259 [本地调试]Require stack:
17:46:06.262 [本地调试]- /Users/zhangxiangchen/Documents/HBuilderProjects/uni-admin/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js
17:46:06.263 [本地调试] at Function.Module._resolveFilename [as _oldResolveFilename] (internal/modules/cjs/loader.js:815:15)
17:46:06.267 [本地调试] at Function.resolve (internal/modules/cjs/helpers.js:80:19)
17:46:06.271 [本地调试] at /Users/zhangxiangchen/Documents/HBuilderProjects/uni-admin/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js:19:15
17:46:06.275 [本地调试] at /Users/zhangxiangchen/Documents/HBuilderProjects/uni-admin/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js:213:3
17:46:06.278 [本地调试] at /Users/zhangxiangchen/Documents/HBuilderProjects/uni-admin/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/lib/utils/register.js:214:2
17:46:06.278 [本地调试] at Script.runInContext (vm.js:130:18)
17:46:07.617 [本地调试][云对象:uni-id-co]调用方法:[login],请求参数: {}
17:46:07.627 [本地调试]Error: Method[login] not found
17:46:07.634 [本地调试] at processTicksAndRejections (internal/process/task_queues.js:97:5)
uni-id-co 中,npm install 了,还是不行啊,好奇怪。 为啥新建的uni-starter项目没问题,导入uni-id-pages插件,就有这个问题?
npm install
added 21 packages, and audited 27 packages in 4s
1 package is looking for funding
run `npm fund` for details
1 moderate severity vulnerability
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
1***@126.com
可以了
2022-11-18 16:18