收藏
回答

tcb storage upload报错,请问该怎么解决啊?

框架类型 问题类型 终端类型 AppID 环境ID 基础库版本
小程序 Bug 工具 wx528717e096ccdd6b develop-yun 2.21.0
E:\work>tcb storage upload .\ hanyu -e pndb-b10c4569gjamyfda 
CloudBase CLI 2.2.6
CloudBase Framework 1.9.6
\ 准备上传中...unhandledRejection TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
    at Object.stat (node:fs:1458:10)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_cos-nodejs-sdk-v5@2.9.0@cos-nodejs-sdk-v5\sdk\advance.js:806:12
    at Object.each (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_cos-nodejs-sdk-v5@2.9.0@cos-nodejs-sdk-v5\sdk\util.js:248:13)
    at COS.uploadFiles (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_cos-nodejs-sdk-v5@2.9.0@cos-nodejs-sdk-v5\sdk\advance.js:805:10)
    at COS.uploadFiles (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_cos-nodejs-sdk-v5@2.9.0@cos-nodejs-sdk-v5\sdk\util.js:462:29)
    at node:internal/util:360:7
    at new Promise (<anonymous>)
    at COS.<anonymous> (node:internal/util:346:12)
    at StorageService.uploadFilesWithRetry (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_@cloudbase_manager-node@4.0.1@@cloudbase\manager-node\lib\storage\index.js:898:27)
    at StorageService.uploadDirectoryCustom (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_@cloudbase_manager-node@4.0.1@@cloudbase\manager-node\lib\storage\index.js:249:21)
    at async StorageService.descriptor.value (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_@cloudbase_manager-node@4.0.1@@cloudbase\manager-node\lib\utils\envLazy.js:13:26)
    at async StorageService.descriptor.value (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_@cloudbase_manager-node@4.0.1@@cloudbase\manager-node\lib\utils\envLazy.js:13:26) {
  code: 'ERR_INVALID_ARG_TYPE'
}
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
    at Object.stat (node:fs:1458:10)
    at C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_cos-nodejs-sdk-v5@2.9.0@cos-nodejs-sdk-v5\sdk\advance.js:806:12
    at Object.each (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_cos-nodejs-sdk-v5@2.9.0@cos-nodejs-sdk-v5\sdk\util.js:248:13)
    at COS.uploadFiles (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_cos-nodejs-sdk-v5@2.9.0@cos-nodejs-sdk-v5\sdk\advance.js:805:10)
    at COS.uploadFiles (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_cos-nodejs-sdk-v5@2.9.0@cos-nodejs-sdk-v5\sdk\util.js:462:29)
    at node:internal/util:360:7
    at new Promise (<anonymous>)
    at COS.<anonymous> (node:internal/util:346:12)
    at StorageService.uploadFilesWithRetry (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_@cloudbase_manager-node@4.0.1@@cloudbase\manager-node\lib\storage\index.js:898:27)
    at StorageService.uploadDirectoryCustom (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_@cloudbase_manager-node@4.0.1@@cloudbase\manager-node\lib\storage\index.js:249:21)
    at async StorageService.descriptor.value (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_@cloudbase_manager-node@4.0.1@@cloudbase\manager-node\lib\utils\envLazy.js:13:26)
    at async StorageService.descriptor.value (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@cloudbase\cli\node_modules\_@cloudbase_manager-node@4.0.1@@cloudbase\manager-node\lib\utils\envLazy.js:13:26)
× The "path" argument must be of type string or an instance of Buffer or URL. Received undefined


E:\work>
   
  hanyu这个目录怎么都传不上去,请问怎么解决?谢谢!
回答关注问题邀请回答
收藏

1 个回答

  • 木系石
    木系石
    2023-03-28

    这个问题一直能重现吗?我也windows,能上传成功

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