Skip to content
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

@netlify/vite-plugin-react-router 1.0.0 prevents build/index.js from generating #494

Open
designmatty opened this issue Feb 7, 2025 · 2 comments · May be fixed by netlify/react-router-template#7
Assignees
Labels
documentation Improvements or additions to documentation Remix

Comments

@designmatty
Copy link

Describe the bug A clear and concise description of what the bug is.

After upgrading to @netlify/vite-plugin-react-router to 1.0.0 react-router build will no longer produce an index.js inside of build/server preventing react-router-serve ./build/server/index.js from working correctly.

To Reproduce Steps to reproduce the behavior:

  1. Clone netlify/react-router-template
  2. Update @netlify/vite-plugin-react-router to 1.0.0
  3. npm run build
  4. Inspect the build/server directory. There will be no index.js
  5. npm run start will fail
  6. Revert the update back to ^0.0.0 and repeat the above, it should work as expected.

Expected behavior A clear and concise description of what you expected to happen.

I would expect the index.js file to be present or, if expected behavior, documentation to get around the new behavior.

Desktop (please complete the following information):

  • OS: Mac OS 14.7.2
  • Node version: v22.13.0

Additional context Add any other context about the problem here.

I have also tried upgrading all React Router dependencies to their latest versions (as of writing 7.1.5

@serhalp
Copy link
Contributor

serhalp commented Feb 24, 2025

Hi @designmatty, thanks for reporting this!

That npm run start command is definitely wrong. We don't actually expect the file ./build/server/index.js to exist with the setup in this template.

I've fixed this in this PR: netlify/react-router-template#7.

Thanks again!

@serhalp serhalp added the documentation Improvements or additions to documentation label Feb 24, 2025
@designmatty
Copy link
Author

Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation Remix
Projects
None yet
2 participants