-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix import path in function when building on Windows #281
Conversation
✅ Deploy Preview for remix-edge ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for remix-serverless ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks perfect! Ideally, we'd also add a test for this, but it looks like we don't have a test setup in this repository yet.
fcd4a27
to
aecf292
Compare
Peter, could you provide a minimal reproduction repository where this is broken? |
I am assuming you are referring to my-remix-udemy-section3-netlify4, not my-remix-udemy-section3-netlify3. Both 'netlify dev' and 'netlify serve' work great with my-remix-udemy-section3-netlify4. I upgraded to remix-adapter (2.3.1) and my problems with my-remix-udemy-section3-netlify4 went away. |
Thank you folks for all of your help |
Description
On Windows, run
ntl build --offline
ondemos/vite-functions
ordemos/vite-edge
and you will receive some version of the following error:This happens because
export { default } from "..\..\build\server\server.js";
is generated at the top ofdemos/vite-functions/.netlify/functions-internal/remix-server.mjs
. The backslashes are then read as escape characters, hence the'...uildserverserver.js'
with missing characters in the error message.The fix is to convert the path to posix before generating the file to create the following output instead:
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
ntl build --offline
on a Windows machine or VM targeting thevite-functions
orvite-edge
demo site.For us to review and ship your PR efficiently, please perform the following steps:
Open a bug/issue before writing your code 🧑💻. Thisensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a
typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
guide and passes our tests.
Update or add tests (if any source code was changed or added) 🧪Update or add documentation (if features were changed or added) 📝