Next.js: [Next 9.0.0] New Api-route doesn't work on prod

Created on 9 Jul 2019  路  2Comments  路  Source: vercel/next.js

Examples bug report

Example name

api-routes

Describe the bug

The new API route works on a dev server but not on a production server

To Reproduce

https://github.com/zeit/next.js/tree/master/examples/api-routes

  1. npm run build
  2. npm run start
  3. click on Luke Skywalker
  4. Error message : Error: Cannot find module for page: /api/people/1

Expected behavior

Should work like on the dev server

Screenshots

image

System information

  • OS: [Linux Mint 19.1 Cinnamon]
  • Version of Next.js: [9.0.0]

Most helpful comment

This was fixed in next@canary. Thanks for the report!

All 2 comments

This was fixed in next@canary. Thanks for the report!

i had same issue, thanks for fix!!

Was this page helpful?
0 / 5 - 0 ratings