-
-
Notifications
You must be signed in to change notification settings - Fork 339
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
Getting "TypeError: __getAllUserFiles is not a function" when running production server #11
Comments
What Vite version are you using? |
➜ vite -v
vite/2.1.0 darwin-x64 node-v14.3.0 |
I can reproduce, let me fix this. |
Thank you! |
You need one more thing. |
There is aslo a bug vitejs/vite#2390 and a pending PR vitejs/vite#2519. But I wrote a patch yarn add vite-plugin-ssr@0.1.0-beta.15
yarn add vite@2.1.2
yarn add @brillout/vite-fix-2390
yarn vite-fix-2390 # It should say `Vite already patched`
rm -r dist/ node_modules/.vite
yarn build
yarn server:prod Let me know if you run into any issue. |
Works perfectly - thanks so much! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
When I run
yarn server:prod
the server starts fine (I see theserver running at http://localhost:3000
message) but, when I try to make a request from the browser I get an error message in the console and the browser never receives a response.The dev server (
yarn dev
) does not have this problem.I followed the "Manual Installation" section of the README for React + TypeScript so it's possible I missed something but, as far as I can tell, what I have is the same as the react-typescript boilerplate.
Error message:
package.json script:
server/index.ts:
Any help would be appreciated. Thanks in advance.
The text was updated successfully, but these errors were encountered: