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

custom-server-typescript: all routes return 404 on next.js 5.1.0 but work fine on 5.0.0 #4071

Closed
1 task done
frankhale opened this issue Mar 28, 2018 · 4 comments
Closed
1 task done

Comments

@frankhale
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The custom-server-typescript example should work as expected on next.js 5.1.0. All routes should resolve to their respective pages in the pages/ folder.

Current Behavior

The custom-server-typescript example's routes all return 404 on next.js 5.1.0 but work fine on 5.0.0

Steps to Reproduce (for bugs)

  1. clone the custom-server-typescript example
  2. follow steps to install dependencies and run example
  3. navigate to the index, a or b routes
  4. all routes return 404 instead of their respective pages
  5. downgrade next.js to 5.0.0 (eg. npm install next@5.0.0 --save)
  6. rerun the example (eg. npm run dev)
  7. navigate to the index, a and b routes and they work as expected

Your Environment

Tech Version
next v5.1.0
node v9.9.0 x64
OS Windows 10 x64
browser Chrome 65.0.3325.181
@frankhale frankhale changed the title custom-server-typescript: all routes return 404 on next.js 5.1.0 custom-server-typescript: all routes return 404 on next.js 5.1.0 but work fine on 5.0.0 Mar 28, 2018
@brennongs
Copy link

Having the same problem here but with the with-typescript example built with create-next-app. Played around a bit with file extensions, and my pages render correctly if they are .js, but aren't rendered at all if they are .tsx or .ts.

@timneutkens
Copy link
Member

Upgrade @zeit/next-typescript to the latest version as suggested in the blogpost.

yarn add @zeit/next-typescript@latest

@timneutkens
Copy link
Member

Also upgraded the example: 069f45d

@frankhale
Copy link
Author

Thank you!

@lock lock bot locked as resolved and limited conversation to collaborators Mar 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants