You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📋 Description of content that is out-of-date or incorrect
Hi,
On this page https://docs.solidjs.com/solid-start/reference/config/define-config of the solidstart documentation, we can see how to setup an alternative server runtime instead of Node.js , like Deno, because it is supported by Nitro (if I do understand well ?), by looking at the Nitro's documentation, I can see that it also support Bun.js as a runtime (https://nitro.build/deploy/runtimes/bun), with the preset "bun". After having a look to the SolidStart's code, if I'm not mistaking, I do not see specific configuration to enable the preset "deno_server", so I guess that with the "bun" preset, it should work too, with very little effort, like:
Even if I tried with the basic project example bellow of a page with a button which call a server function to create a local file with Bun.js method Bun.write("./newfile.txt", "Hello Bun.js"); , and it did not worked (Error: "Bun is not defined"), maybe I missing something within the config of project.
I'm sharing the repo bellow:
Thanks a lot for your feedback.
And if you can help me out to make this configuration work, I'll make PR to complete SolidStart's repo examples with great Bunjs' features within SolidStart.
Best
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
I used Bun version 1.2.2 to build the repo you shared with this command:
bun run build
Then, I started the server with:
bun run start
After that, I opened http://localhost:3000/ and clicked the "Create File" button. A file called newfile.txt showed up in the root directory with the text "Hello Bun Server Function." So, everything seems to be working as it should.
We will add a link to Nitro's documentation for Bun in our docs. You shouldn’t need any extra configuration apart from that. If you’re still running into the error, please open an issue in the SolidStart repository.
📚 Subject area/topic
/solid-start/reference/config/define-config.mdx
📋 Page(s) affected (or suggested, for new content)
https://docs.solidjs.com/solid-start/reference/config/define-config
![Image](https://private-user-images.githubusercontent.com/5137904/407269883-5de81fa0-e887-4c7d-aa98-67a7a31ad3a7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk4MTA0NDgsIm5iZiI6MTczOTgxMDE0OCwicGF0aCI6Ii81MTM3OTA0LzQwNzI2OTg4My01ZGU4MWZhMC1lODg3LTRjN2QtYWE5OC02N2E3YTMxYWQzYTcucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTdUMTYzNTQ4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmFiOTIzNGQxOTliNzhmYWVhYTE3YTc5OTRlMzc2MzRjODY1NWRjNzBiNmM5YjE4YzNjMjNkYWU2NGE2NjhhNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.7AYZw4eowHSaGd7LmiBZnrmA_6X_tjI684a1B3H7aec)
📋 Description of content that is out-of-date or incorrect
Hi,
On this page https://docs.solidjs.com/solid-start/reference/config/define-config of the solidstart documentation, we can see how to setup an alternative server runtime instead of Node.js , like Deno, because it is supported by Nitro (if I do understand well ?), by looking at the Nitro's documentation, I can see that it also support Bun.js as a runtime (https://nitro.build/deploy/runtimes/bun), with the preset "bun". After having a look to the SolidStart's code, if I'm not mistaking, I do not see specific configuration to enable the preset "deno_server", so I guess that with the "bun" preset, it should work too, with very little effort, like:
Even if I tried with the basic project example bellow of a page with a button which call a server function to create a local file with Bun.js method
Bun.write("./newfile.txt", "Hello Bun.js");
, and it did not worked (Error: "Bun is not defined"), maybe I missing something within the config of project.I'm sharing the repo bellow:
Thanks a lot for your feedback.
And if you can help me out to make this configuration work, I'll make PR to complete SolidStart's repo examples with great Bunjs' features within SolidStart.
Best
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
Here the basic repo to try it out: https://github.com/TLevesque/solidstart-bunjs/tree/main
The text was updated successfully, but these errors were encountered: