Open indietyp opened 4 months ago
I am generally going to ask for reproductions. Doesn't matter how trivial it is. It saves a good chunk of time. And when triaging happens how much time estimate to look into an issue comes into consideration.
That being said looking at the error maybe it's related to async
being used as a function. Something expecting it to be a JavaScript keyword only perhaps. It looks like the error is in the effect.js code. But the error looking =>
is what I'd expect if it sees async()
somewhere and doesn't recognize it is a function call.
The oddest part is this is a parser issue in TypeScript of all things. I can tell from the error this is coming from SolidStart so it might even be other bundling transform considerations, not even the JSX transform.
O yea sorry! I was kind of in a hurry when creating the issue 😅, so I wasn't really able to create a repro repo. Sorry! I'll update the issue first thing tomorrow to link to a reproduction repository.
I have created a minimal reproductive repository using SolidStart and have linked it to the issue description. Sorry again, and I hope this helps!
Thanks I might move this to Start now because I'm not sure what piece in the pipeline is causing this.
adding:
solid: {
exclude: ["**/node_modules/.vinxi/client/deps/**/*"],
},
to the app.config.ts
seems to have resolved the issue.
I had the same problem today, for me the (temporary?) solution was to remove the whole effect library from the Vite optimizeDeps (in app.config.ts) as per the Vite config: https://vitejs.dev/config/dep-optimization-options.html#optimizedeps-exclude
export default defineConfig({
vite() {
return {
optimizeDeps: {
esbuildOptions: { target: ['esnext'] },
exclude: ['effect'],
},
}
},
})
I have no idea on the implications of this workaround but it seems to be working for the moment.
Reproduction should be pretty easy, just scaffolding a fresh SolidStart project using the CLI, adding the Effect package and running a simple Effect is enough, Babel starts complaining immediately.
Describe the bug
When trying to import the effect library (see: https://effect.website) babel seems to complain, as babel is used in the effect pipeline as well, and the code is valid, it seems odd that solid.js seems to be failing.
The error is:
Your Example Website or App
https://github.com/indietyp/solid-js-regressions/tree/effect-dependency (branch: effect-dependency)
Steps to Reproduce the Bug or Issue
Simply
import { Iterable, pipe } from "effect";
in a solid start repo should work.Expected behavior
I can compile
Screenshots or Videos
No response
Platform
Additional context