Search code examples
nuxt.jsvercel

Deploying Simple Nuxt.js application to now.sh not working


could anyone explain to me what could go wrong here?

I've deployed a blog application written in Nuxt.js with dynamic article pages to now.sh - . Nothing fancy there. The home page works fine. When I'm visiting sub-pages using internal links, also everything is fine.

However, when I do a hard-refresh on the sub-pages, I'm getting an error: Nuxt.js Internal Server Error

I've checked the logs and this is what I get:

Duration: 27.23 ms  Billed Duration: 100 ms  Memory Size: 3008 MB  Max Memory Used: 120 MB    
Duration: 24.45 ms  Billed Duration: 100 ms  Memory Size: 3008 MB  Max Memory Used: 121 MB    
 ERROR  Request failed with status code 500
  at e.exports (server.js:2:18485)
  at e.exports (server.js:2:45908)
  at IncomingMessage.<anonymous> (server.js:2:354490)
  at IncomingMessage.emit (events.js:203:15)
  at IncomingMessage.EventEmitter.emit (domain.js:448:20)
  at endReadableNT (_stream_readable.js:1143:12)
  at process._tickCallback (internal/process/next_tick.js:63:19)
Duration: 669.35 ms  Billed Duration: 700 ms  Memory Size: 3008 MB  Max Memory Used: 126 MB

It's a super-simple nuxt application, I'm really not sure how anything could be wrong here.

Repository: https://github.com/driggl/blog


Solution

  • I think that is not a problem with zeit. First you should configure how nuxt should generate your dynamic routes.

    Check this fragment of the documentation: https://nuxtjs.org/api/configuration-generate/#routes

    And you have some information on Stack also, here => Nuxt Generate Dynamic Routes Path