WeixinCloud / wxcloud

All in Serverless. 微信云托管
MIT License
9 stars 4 forks source link

使用Weixin Cloudbase Docker Extension 这个vscode 插件调试的是用,直接Start能够正常使用,但是使用Live Coding的时候,就会报错 #3

Open visnix opened 1 year ago

visnix commented 1 year ago

使用的环境是 M1 pro 芯片的MacOS 13.4版本, 使用的 Apple 芯片的 docker for Mac

使用Weixin Cloudbase Docker Extension 这个vscode 插件调试的时候,直接Start能够正常使用,但是使用Live Coding的时候,就会报错

[nodemon] failed to start process, "/wxcloudrun-wxcomponent/main" exec not found

image image

[+] Building 0.0s (0/0)

[+] Running 1/0

✔ Container wxcloud_hl-wxcomponent Running 0.0s

Attaching to wxcloud_hl-wxcomponent

wxcloud_hl-wxcomponent | [nodemon] 2.0.15-weixin-cloudbase

wxcloud_hl-wxcomponent | [nodemon] to restart at any time, enter rs

wxcloud_hl-wxcomponent | [nodemon] watching path(s): */

wxcloud_hl-wxcomponent | [nodemon] watching extensions: java,js,mjs,json,ts,cs,py,go

wxcloud_hl-wxcomponent | [nodemon] starting /wxcloudrun-wxcomponent/main

wxcloud_hl-wxcomponent | sh: /wxcloudrun-wxcomponent/main: not found

wxcloud_hl-wxcomponent | [nodemon] failed to start process, "/wxcloudrun-wxcomponent/main" exec not found

wxcloud_hl-wxcomponent | [nodemon] Error

wxcloud_hl-wxcomponent | at Bus. (/snapshot/nodemon/lib/nodemon.js:158:25)

wxcloud_hl-wxcomponent | at Bus.emit (node:events:538:35)

wxcloud_hl-wxcomponent | at ChildProcess. (/snapshot/nodemon/lib/monitor/run.js:190:11)

wxcloud_hl-wxcomponent | at ChildProcess.emit (node:events:526:28)

wxcloud_hl-wxcomponent | at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)

wxcloud_hl-wxcomponent exited with code 0

Cubelrti commented 1 year ago

你好,wxcloudrun-wxcomponent 这个项目的 Dockerfile 比较复杂,暂时不能通过 Live Coding 自动生成,可以参考文档自行编写开发过程中的容器配置文件: https://developers.weixin.qq.com/miniprogram/dev/wxcloudrun/src/guide/debug/dev.html#%E5%BC%80%E5%8F%91%E6%A8%A1%E5%BC%8F%E7%9A%84-Dockerfile