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

404 route only works with .js extension #11

Closed
gmencz opened this issue Oct 29, 2020 · 1 comment
Closed

404 route only works with .js extension #11

gmencz opened this issue Oct 29, 2020 · 1 comment

Comments

@gmencz
Copy link

gmencz commented Oct 29, 2020

I cloned the starter-express repo and I changed the file extension of the files inside routes/ from .js to .tsx and "normal" routes seem to be working just fine but not the 404 one, the following error is thrown when visiting a route that doesn't exist (in this case the route is /dasdsad):

Error: Could not resolve entry module (app/routes/404.js).
[2]     at error (/Users/gabe/code/learning/remix/my-remix-app/node_modules/rollup/dist/shared/rollup.js:5251:30)
[2]     at ModuleLoader.loadEntryModule (/Users/gabe/code/learning/remix/my-remix-app/node_modules/rollup/dist/shared/rollup.js:18410:20)
[2]     at async Promise.all (index 1) {
[2]   code: 'UNRESOLVED_ENTRY',
[2]   watchFiles: [
[2]     '/Users/gabe/code/learning/remix/my-remix-app/app/entry-server.tsx'
[2]   ]
[2] }
[2] GET /dasdsad 500 313.463 ms - -

The app's structure is the following:

image

@gmencz
Copy link
Author

gmencz commented Oct 29, 2020

Nevermind, just realized it says at the docs that the file extension must be .js 😅

@gmencz gmencz closed this as completed Oct 29, 2020
mjackson added a commit that referenced this issue May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant