SolidStart 1.0 and Deno 2.0
I think these two technologies sound very interesting together. Is there currently a happy path to trying them out?
12 Replies
I tried to run solidjs project using deno2, but vite throws error. Deno2 site also does not mention the support of solidjs.
If we can use deno2 with solidjs, it will be perfect combination for web development. I would like to know what is planned for the support of deno2
Solid works on Deno, not sure if Solid Start does. https://github.com/bluwy/create-vite-extra/tree/master this repo has templates for different frameworks on deno
GitHub
GitHub - bluwy/create-vite-extra: Extra Vite templates
Extra Vite templates. Contribute to bluwy/create-vite-extra development by creating an account on GitHub.
Not sure, maybe this can help
https://github.com/denoland/deno/issues/20604
GitHub
Support SolidStart (SolidJS/Vite based) · Issue #20604 · denoland/d...
Platform Darwin 22.6.0 arm64 arm Version deno 1.37.0 Repro deno run -A npm:create-solid deno task dev Expected Dev server start Actual ➜ deno task dev Warning Currently only basic package.json `scr...
the project contains solid templ;ate, but it does not use deno in package.json, while react version use deno. So solidjs seems not supported yet. I checked teh status using peplexity, I found the above bug report. Anywa, deno 2 solid js are both new, these reports are older then those new release.
they don’t have package.json they use deno.json
solid template does not have deno.json. have you test them? it may run, but it won't use deno2.
I was bit confused. I was looking at ssr. . I will try that.
this sample worked. but my original case still not work. I needed to put a lot of --alow**, then it ended with error for loading vite.config.mjs by tring to access stdio.on where stdio is null. I put following parameters:
deno run --allow-net --allow-read --allow-env --allow-sys --allow-ffi --node-modules-dir --allow-write npm:vite
my impression is better to wait until deno2 announce the support of solidjs..
the --allow* flags are just how deno permissions work. if you don't care about permissions just do
-A
Not sure what problems you are having but it works for me
I was able to run with the -A option after removing css, server, build, and optimizeDeps. However, I'm still encountering an error when parsing vite.config.mjs with explicit parameters:
javascript
TypeError: Cannot read properties of null (reading 'on')
It seems this error occurs because stdio is null. It’s strange that a subset of the -A option causes an error, while -A itself works fine.
In any case, if the existing configuration doesn’t work, the migration might not be straightforward.
You may be able to reproduce this issue with the following
vite.config.mjs
:
Additionally, I often encounter a "too many files open" error.
-A may work because there are more parameters to allow something?? but I did not such error message.@Tegan that's cool and all but can you get it to work with solid start?
I didn't have to do anything special
The unfortunate result for me on windows