收藏
回答

云函数返回 "stackTrace":"re.findall is not a function?

求助,如上:我用request-promise 如从网页获取json数据,准备用re模块解析,便引入了re模块,在云函数后台报错 "errorCode":1,"errorMessage":"user code exception caught","stackTrace":"re.findall is not a function\nTypeError: re.findall is not a function\n

请问哪里错了,该怎么解决?


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

1 个回答

  • xplee
    xplee
    2020-06-03

    re是哪个库?

    2020-06-03
    有用
    回复 6
    • TLSODO
      TLSODO
      2020-06-03
      “re”  0.1.4版,和正则相关的
      2020-06-03
      回复
    • xplee
      xplee
      2020-06-03回复TLSODO
      是这个包:https://www.npmjs.com/package/re
      2020-06-03
      回复
    • xplee
      xplee
      2020-06-03
      官方可是这么写的:
      var Re = require('re'), 
      re = new Re();
      2020-06-03
      回复
    • xplee
      xplee
      2020-06-03
      和正则好像没关系啊
      2020-06-03
      回复
    • TLSODO
      TLSODO
      2020-06-03
      我是模仿的这个,想处理json数据
      2020-06-03
      回复
    查看更多(1)
登录 后发表内容
问题标签