收藏
回答

SyntaxError: Invalid or unexpected token在云开发报这个错?

在云开发过程序中,前面开发的很正常,也能跑起来,我把云函数本地测试关闭后就报下面的问题了,真机上也是这样,一样的代码,为什么开户云函数本地测试就没有问题呢?

Error: errCode: -404011 cloud function execution error | errMsg: cloud.callFunction:fail requestID 38451064-849d-11eb-90f0-5254008cccea, cloud function service error code -504002, error message Runtime.UserCodeSyntaxError: SyntaxError: Invalid or unexpected token

    at Object.module.exports.load (:40835/var/runtime/node10/UserFunction.js:33)

    at Runtime.handleOnce (:40835/var/runtime/node10/Runtime.engine.js:95)

    at Timeout.setTimeout [as _onTimeout] (:40835/var/runtime/node10/Runtime.engine.js:54)

    at ontimeout (:40835/appservice/timers.js:436)

    at tryOnTimeout (:40835/appservice/timers.js:300)

    at listOnTimeout (:40835/appservice/timers.js:263)

    at Timer.processTimers (:40835/appservice/timers.js:223); at cloud.callFunction api; 

    at new g (VM1632 WAService.js:2)

    at c (VM1632 WAService.js:2)

    at I (VM1632 WAService.js:2)

    at Function.success (VM1632 WAService.js:2)

    at C (VM1632 WAService.js:2)

    at VM1632 WAService.js:2

    at u (VM1632 WAService.js:2)

    at Function.<anonymous> (VM1632 WAService.js:2)

    at C (VM1632 WAService.js:2)

    at VM1632 WAService.js:2

回答关注问题邀请回答
收藏

1 个回答

  • 开心就好
    开心就好
    2021-03-14

    知道问题所在了,是不能用类的私有属性定义,即:#属性名,只能改为公共属性了,坑了几个小时

    2021-03-14
    有用
    回复
登录 后发表内容
问题标签