3***@qq.com
3***@qq.com
  • 发布:2024-03-09 11:27
  • 更新:2024-03-11 14:40
  • 阅读:114

云函数如何上传第三方npm库

分类:uniCloud

本地可以运行,前一段时间生产环境也可以,昨天突然生产环境就不行了
下面是运行日志
请求入参: {
"args": {
"action": "login",
"params": {
"mobile": "13694222592",
"password": "123456"
},
"clientInfo": {
"PLATFORM": "app",
"OS": "android",
"APPID": "UNIDEC0848",
"DEVICEID": "084C4B313480316320BC1DBEA52E443A",
"channel": "",
"scene": 1001,
"appId": "UNIDEC0848",
"appLanguage": "zh-Hans",
"appName": "毒耀",
"appVersion": "1.0.01",
"appVersionCode": 1001,
"appWgtVersion": "1.0.02",
"browserName": "chrome",
"browserVersion": "92.0.4515.105",
"deviceBrand": "huawei",
"deviceId": "084C4B313480316320BC1DBEA52E443A",
"deviceModel": "LYA-AL00",
"deviceOrientation": "portrait",
"devicePixelRatio": 4,
"deviceType": "phone",
"errMsg": "getSystemInfoSync:ok",
"oaid": "78239d7a-702d-414b-bbf8-fb9f0a74fdce",
"osAndroidAPILevel": 29,
"osLanguage": "zh-CN",
"osName": "android",
"osTheme": "light",
"osVersion": "10",
"romName": "HarmonyOS",
"romVersion": "3.0.0",
"safeArea": {
"left": 0,
"right": 360,
"top": 25,
"bottom": 780,
"width": 360,
"height": 755
},
"safeAreaInsets": {
"top": 25,
"right": 0,
"bottom": 0,
"left": 0
},
"screenHeight": 780,
"screenWidth": 360,
"statusBarHeight": 25,
"ua": "Mozilla/5.0 (Linux; Android 10; LYA-AL00 Build/HUAWEILYA-AL00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/92.0.4515.105 Mobile Safari/537.36 uni-app (Immersed/25.0)",
"uniCompileVersion": "4.02",
"uniPlatform": "app",
"uniRuntimeVersion": "4.02",
"windowBottom": 0,
"windowHeight": 780,
"windowTop": 0,
"windowWidth": 360,
"locale": "zh-Hans",
"LOCALE": "zh-Hans"
}
},
"requestId": "ac1cd36d1709953509363168489"
}
[DY_users/ac1cd36d1709953509363168489/23ms/ERROR] Cannot find module 'jsonwebtoken'
Require stack:

  • /tmp/function/@common_modules/aes/index.js
  • /tmp/function/@common_modules/user-verify/index.js
  • /tmp/function/__index.js
  • /tmp/function/index.js
  • /code/index.js
  • /var/fc/runtime/nodejs12/prepare_code.js
  • /var/fc/runtime/nodejs12/invoke.js
  • /var/fc/runtime/nodejs12/bootstrap.js
    Error: Cannot find module 'jsonwebtoken'
    Require stack:
  • /tmp/function/@common_modules/aes/index.js
  • /tmp/function/@common_modules/user-verify/index.js
  • /tmp/function/__index.js
  • /tmp/function/index.js
  • /code/index.js
  • /var/fc/runtime/nodejs12/prepare_code.js
  • /var/fc/runtime/nodejs12/invoke.js
  • /var/fc/runtime/nodejs12/bootstrap.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/tmp/function/@common_modules/aes/index.js:2:13)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    请求响应状态: fail
2024-03-09 11:27 负责人:无 分享
已邀请:
HRK_01

HRK_01

看一下modules文件下的jsonwebtoken有没有被正常安装

要回复问题请先登录注册