-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Closed
Labels
OutputRelated to the the output configuration option.Related to the the output configuration option.bugIssue was opened via the bug report template.Issue was opened via the bug report template.
Description
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000
Binaries:
Node: 16.14.2
npm: 8.5.0
Yarn: 1.22.18
pnpm: N/A
Relevant packages:
next: 13.0.3
eslint-config-next: 13.0.3
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
N/A
How are you deploying your application? (if relevant)
Docker
Describe the Bug
The appDir feature does not work when building the app with output: "standalone" mode. The produced .next/standalone/server directory is missing the app content as well as the corresponding traces, dependencies and chunks. This causes the standalone application to throw 404 errors on all page routes.
Expected Behavior
The .next/standalone folder should contain all the necessary files for the app directory along with required node_modules dependencies and related chunk files. The app should not throw 404 errors when running the node .next/standalone/server.js file.
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://codesandbox.io/s/unruffled-bose-7eykvd?file=/next.config.js
To Reproduce
- Enable
experimental.appDir = trueinnext.config.jsfile. - Enable
output = "standalone"innext.config.jsfile. - Run a build:
npm run build. - Run the produced output
node .next/standalone/server.jsfile.
Application crashes with 404 errors.
mdfahadhossain, kevinold, darthmaim, khuezy and revmischa
Metadata
Metadata
Assignees
Labels
OutputRelated to the the output configuration option.Related to the the output configuration option.bugIssue was opened via the bug report template.Issue was opened via the bug report template.