模块引用异常,模块对象由table变为userdata导致无法使用,求解
common是我指定的lua包引用地址,是项目里的一个层级,commlib.lua在common的根目录,google.lua是common目录下其他文件夹中的文件,在google.lua中引用commlib.lua时,发生了commlib的对象本应该是table类型的,结果变为suerdata类型,导致无法使用
2019/09/05 01:15:14 [error] 6#0: *2 lua entry thread aborted: runtime error: ./common/libs/google.lua:128: attempt to index upvalue 'commlib' (a userdata value)
stack traceback:
coroutine 0:
./common/libs/google.lua: in function 'get_detail_info_by_token'
./common/commlib.lua:37: in function 'get_detail_info_by_token'
/opt/openresty/subscriptions/v1/sub.lua:56: in function </opt/openresty/subscriptions/v1/sub.lua:1>, client: 172.17.0.1, server: , request: "POST /v1/sub HTTP/1.1", host: "127.0.0.1:13001"