有赞新零售社区

发帖
API使用问题»nodejs SDK无法使用

[API调用-商品/交易] nodejs SDK无法使用

129409bd0453 2023-02-14 634 浏览 4 评论 | 只看楼主 [打印]
小程序中引入NodeJs 运行example代码报错
用手机打开
收藏 ··· 回复
    129409bd0453 青铜   2023-02-14 | 只看该作者
    Couldn't resolve the Js file "fs" relative to "/miniprogram_npm/youzanyun-sdk/index.js`:0:0`"

    Couldn't resolve the Js file "util" relative to "/miniprogram_npm/form-data/index.js`:0:0`"

    Couldn't resolve the Js file "path" relative to "/miniprogram_npm/form-data/index.js`:0:0`"

    Couldn't resolve the Js file "http" relative to "/miniprogram_npm/form-data/index.js`:0:0`"

    Couldn't resolve the Js file "https" relative to "/miniprogram_npm/form-data/index.js`:0:0`"

    Couldn't resolve the Js file "url" relative to "/miniprogram_npm/form-data/index.js`:0:0`"

    Couldn't resolve the Js file "fs" relative to "/miniprogram_npm/form-data/index.js`:0:0`"

      129409bd0453 青铜   2023-02-14 | 只看该作者
      TypeError: Cannot read property 'prototype' of undefined
          at runInContext (lodash.js:1463)
          at Object.<anonymous> (lodash.js:17182)
          at Object.func (lodash.js:17209)
          at __REQUIRE__ (index.js:5)
          at lodash.js:17210
          at lodash.js:17210
          at C (wxmodule.patch.js?t=wechat&s=1676337540577&v=2.19.1:1)
          at n (wxmodule.patch.js?t=wechat&s=1676337540577&v=2.19.1:1)
          at __REQUIRE__ (index.js:31)
          at token.js:46(env: macOS,mp,1.06.2301040; lib: 2.19.1)

        129409bd0453 青铜   2023-02-14 | 只看该作者
        Cannot read property 'prototype' of undefined
        TypeError: Cannot read property 'prototype' of undefined
            at runInContext (http://127.0.0.1:17929/appservice/miniprogram_npm/lodash/index.js:1471:28)
            at Object.<anonymous> (http://127.0.0.1:17929/appservice/miniprogram_npm/lodash/index.js:17190:11)
            at Object.func (http://127.0.0.1:17929/appservice/miniprogram_npm/lodash/index.js:17217:3)
            at __REQUIRE__ (http://127.0.0.1:17929/appservice/miniprogram_npm/lodash/index.js:5:601)
            at http://127.0.0.1:17929/appservice/miniprogram_npm/lodash/index.js:17220:8
            at http://127.0.0.1:17929/appservice/miniprogram_npm/lodash/index.js:17221:3
            at C (http://127.0.0.1:17929/appservice/__dev__/wxmodule.patch.js?t=wechat&s=1676337540577&v=2.19.1:1:5787)
            at n (http://127.0.0.1:17929/appservice/__dev__/wxmodule.patch.js?t=wechat&s=1676337540577&v=2.19.1:1:4741)
            at __REQUIRE__ (http://127.0.0.1:17929/appservice/miniprogram_npm/youzanyun-sdk/index.js:31:34)
            at http://127.0.0.1:17929/appservice/miniprogram_npm/youzanyun-sdk/index.js:157:12(env: macOS,mp,1.06.2301040; lib: 2.19.1)

          您好,请按版规发帖:https://bbs.youzan.com/thread-684638-1-1.html

            1跳至
            您需要登录后才可以回帖 登录 | 立即注册

            本版积分规则

            复制链接
            新浪微博
            QQ空间
            微信扫码
            • 回复

            • 评分

            客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

            复制成功