Shaun
Shaun
HHono
Created by Shaun on 2/22/2025 in #help
Failed deploy with Hono, Vite and email event handler
@ambergristle I also created an issue on Github (https://github.com/honojs/hono/issues/3955). For now I will just use two projects. One for the email worker and one for the front-end. That prevents using workarounds and will be easier to combine them when a proper fix is created. Thank you very much for all the help!
33 replies
HHono
Created by Shaun on 2/22/2025 in #help
Failed deploy with Hono, Vite and email event handler
That's handy indeed! Is there anything else I can try? I can't be the only person that tried to use client components with Vite and export default { fetch: app.fetch}, right?
33 replies
HHono
Created by Shaun on 2/22/2025 in #help
Failed deploy with Hono, Vite and email event handler
Important to mention is that yarn dev and yarn build works like it should, but when running yarn deploy I get the error:
⛅️ wrangler 3.109.3
--------------------

🌀 Building list of assets...
🌀 Starting asset upload...
No files to upload. Proceeding with deployment...
Total Upload: 44.39 KiB / gzip: 16.68 KiB
No bindings found.

✘ [ERROR] A request to the Cloudflare API (/accounts/***/workers/scripts/test/versions) failed.

Uncaught TypeError: Cannot read properties of undefined (reading 'map')
at null.<anonymous> (file:///Users/shaunjanssens/Desktop/hono-tsx/dist/index.js:1:20275) in
route
at null.<anonymous> (file:///Users/shaunjanssens/Desktop/hono-tsx/dist/index.js:1:31178)
[code: 10021]


If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose


error Command failed with exit code 1.
⛅️ wrangler 3.109.3
--------------------

🌀 Building list of assets...
🌀 Starting asset upload...
No files to upload. Proceeding with deployment...
Total Upload: 44.39 KiB / gzip: 16.68 KiB
No bindings found.

✘ [ERROR] A request to the Cloudflare API (/accounts/***/workers/scripts/test/versions) failed.

Uncaught TypeError: Cannot read properties of undefined (reading 'map')
at null.<anonymous> (file:///Users/shaunjanssens/Desktop/hono-tsx/dist/index.js:1:20275) in
route
at null.<anonymous> (file:///Users/shaunjanssens/Desktop/hono-tsx/dist/index.js:1:31178)
[code: 10021]


If you think this is a bug, please open an issue at:
https://github.com/cloudflare/workers-sdk/issues/new/choose


error Command failed with exit code 1.
33 replies
HHono
Created by Shaun on 2/22/2025 in #help
Failed deploy with Hono, Vite and email event handler
The thing I would like to achieve is to have a single command to deploy both the frontend and the email worker.
33 replies
HHono
Created by Shaun on 2/22/2025 in #help
Failed deploy with Hono, Vite and email event handler
I honnestly don't have any idea, I suppose I just tried multiple things. The repo I shared now has the dev and build command I copied from the example and I added the deploy command with Wrangler.
33 replies
HHono
Created by Shaun on 2/22/2025 in #help
Failed deploy with Hono, Vite and email event handler
@ambergristle Thank you for your answer! I read the documentation but couldn't find the way to go from the cloudflare-workers starter using yarn create hono to a way to use the client components. What I did found was https://github.com/honojs/examples/tree/main/hono-vite-jsx mentioned on the vite-plugins repo you send. Using the code with the cloudflare-workers started I got the same error when using export default { fetch: app.fetch }. I uploaded the code to a repo: https://github.com/shaunjanssens/hono-tsx Can you please check what I'm doing wrong? Thank you!
33 replies