-
Notifications
You must be signed in to change notification settings - Fork 0
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
Doesn't work on Windows #30
Comments
By the way, I don't get this error with the official Adonis starter packages. |
That's interesting, it seems like absolute ESM imports doesn't work on windows without a |
I don't have a windows PC to test on, but I believe this should work now (fixed in #23).
|
Just tried it and it seems to work, it run normally and I got to see the page that says Welcome to Remix Thank you for that. Can I ask you, is Remix configured in SPA mode or in any specific way? |
Nice! The default application is Remix with SSR. For enabling SPA mode you can add |
Hey, I was really eager to try your package but sadly I can't make it work on Windows. I've spent the last 2 hours trying to figure it out, with the help of ChatGPT 4, and I still can't make it work.
The error message I get is:
"Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 's:'"
I found that Next.js users have been getting a similar error, and this is the proposed solution:
vercel/next.js#64386
I tried changing the IMPORTER in bin/console.ts and bin/server.ts to:
const IMPORTER = (filePath: string) => {
if (filePath.startsWith('./') || filePath.startsWith('../')) {
const fileUrl = new URL(filePath, APP_ROOT).href;
if (process.platform === 'win32') {
return import(fileUrl.replace(/^file:////, 'file://'));
}
return import(fileUrl);
}
return import(filePath);
};
But that didn't work.
I give up, at least for now. If you could take a look, I would highly appreciate it.
The text was updated successfully, but these errors were encountered: