next.js: [NEXT-1157] deploying NextJS 13 `appDir` site to Digital Ocean App platform, Direct link opening doesn't work.

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64
    Binaries:
      Node: 18.12.1
      npm: 9.6.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.3.4
      eslint-config-next: 13.3.4
      react: 18.2.0
      react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true), Routing (next/router, next/navigation, next/link)

Link to the code that reproduces this issue

github.com/dhruvilxcode/eshop

To Reproduce

Deploy the NextJS site to Digital Ocean App Platform or any host. then access the any sub page such as Login page by accessing URL directly, not by Link component (because that works well)

Describe the Bug

When i access url let’s say Login page, by this domain.com/login/ then it’s not loading, instead it showing this (refer to linked image). Screenshot 2023-05-03 at 12 13 16 PM

Expected Behavior

A page should render by accessing it’s URL.

Which browser are you using? (if relevant)

Chrome

How are you deploying your application? (if relevant)

Digital Ocean App Platform

NEXT-1157

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 6
  • Comments: 18 (5 by maintainers)

Most upvoted comments

@roeean please provide a reproduction in a new issue. We’ve added a query string parameter to the end of the request for the RSC payload so it’s hard to say why you’d still see this without being able to investigate the application.

It’s still not working in v13.4.10… I deployed my site to AWS ECS with AWS Cloudfront as CDN, and I still can’t load the pages under App Router properly. Everyone keeps coming as text/x-component

image

For now, i downgraded the next version to 13.2 and It worked well.

npm i next@13.2