-
Notifications
You must be signed in to change notification settings - Fork 146
Unhandled promise rejection when building on Windows #723
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
Comments
I think it is @swc/html not working on Windows. I have not had a chance to dig deeper but the codebase is Rust as well so would be also more challenging. Dev server should be working though. @swc/html is significantly faster than any other alternative and is needed to achieve the build time reduction to resolve #647. If we can test and dig a bit deeper we can bring the issue back to @swc/html |
Is the fast-compress script only intended for use at build time? I wonder if |
Specifying the loader for .node files in the astro config seems to fix it. It's a bit of a funny one as it's going through astro->vite->esbuild. But I'm getting strangely inconsistent results with this as it needs an output path which we don't have in dev mode. I think it only silences the error if you have previously built vite: {
rollupOptions: {
external: ["/src/scripts/*"],
},
optimizeDeps: {
esbuildOptions: {
loader: {'.node': 'file'},
}
}
}, |
@lukeplowden I'm still running into the some error. so, i have
i think it is solved |
Should I open a PR? 😺 |
Theoretically it should only be imported on build but for it to be imported on dev is likely Astro's problem for the dev run. In any case if there is a solution to get it working via the config change, do go for it. |
Most appropriate sections of the p5.js website?
Other (specify if possible)
What is your operating system?
Windows
Web browser and version
N/A
Actual Behavior
When running
npm run dev
on Windows, we sometimes encounter this error:@lukeplowden just encountered this, and it was also reported a month ago here #698 (comment) although we weren't able to reproduce it reliably.
This error seems flaky: rerunning the server again, it didn't happen for Luke.
Some possible next steps here:
@swc/html
library. If that is indeed the cause, are there ways we can avoid using this library?Expected Behavior
Ideally we have no errors when building 🙂
Steps to reproduce
Not sure yet, if anyone figures out exactly what circumstances lead to this, that would help!
Would you like to work on the issue?
I don't actually have Windows myself so I'm unable to work on this
The text was updated successfully, but these errors were encountered: