-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Acorn crashed on TS types #36
Comments
Hmm I remember things like this happening. Is this specifically where islands are involved? or even with islands disabled? |
This only happens when Solid start config flag |
Yup the islands plugin is also doing a parse and its apparently doing a bad non-typescript/jsx parse, which is probably when I first implemeted it, but I remember having to fix the same issue for server functions. So will use the same solution here for server components too. |
Can I get a full version of the file that's failing. I am trying with import { cache } from "@solidjs/router";
type Settings = {};
function getDataAtPath(path) {
"use server";
return {};
}
export const getSettings = cache(async (): Promise<Settings> => {
return getDataAtPath("settings");
}, "settings"); and it seems to work fine |
Here's the package the file in question is in It's slightly changed but I confirm the same behavior. |
(fix): decorate exports use parse-advanced, fixes #36
Hi,
I just tried Start beta with island support. I got an error during the build process:
Acorn crashed with this error:
My code in
src/lib/fetcher.ts
was:When I remove return types like this:
It works!
PS: thanks Nikhil for your amazing work on Vinxi and Solid :-)
The text was updated successfully, but these errors were encountered: