-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Windows clientModule returning null #84
Comments
What I've done is replace the vite config root with a relative url. Looks like the error is thrown in the loadClient function in mode/production.js. production.js line 53
of course if I remove the dynamic import the app says it started but I get a 404 error when navigating to the home page |
I have changed line 53 to use the file path for the dynamic import:
This obviously needs to be cleaned up and tested but this is working on Windows. |
I created PR #85 in order to address these issues. |
Prerequisites
Fastify version
3.29.0
Plugin version
3.0.0-beta.21
Node.js version
16.15.1
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Description
When running vue-stream example on Windows we receive an error:
this comes from the following line in node_modules/fastify-vite/mode/development.js
it looks like the root of the client is returning null. On linux this same app works fine.
In order to fix this on Windows I changed the root in vite config to a relative path (i.e. "./client"). And in package.json, I change the "build:server" file to "./index.js"
After changing to relative urls, when I start the server I get
It may be related to this issue nodejs/node#37845
Steps to Reproduce
Copy vue-stream example to a windows machine and try to use
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: