Skip to content

Missing node_modules in standalone output #56357

@noreiller

Description

@noreiller

Link to the code that reproduces this issue

https://github.com/noreiller/next-missing-modules-in-standalone-pages

To Reproduce

  1. Run npm i
  2. Run npm i [email protected]
  3. Run npm run build
  4. See that the directory .next/standalone/node_modules/@kontent-ai/delivery-sdk/dist/cjs/mappers only contains the index.js file.

Current vs. Expected behavior

Starting from v13.5.4-canary.4, the directory .next/standalone/node_modules/@kontent-ai/delivery-sdk/dist/cjs/mappers only contains the index.js file while previously it contained all the required modules used in the index.js file.

Verify canary release

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

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep  7 10:33:52 UTC 2
Binaries:
  Node: 18.12.1
  npm: 8.19.2
  Yarn: 1.22.19
  pnpm: 8.2.0
Relevant Packages:
  next: 13.5.4
  eslint-config-next: 13.5.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: standalone

Which area(s) are affected? (Select all that apply)

Standalone mode (output: "standalone")

Additional context

In node_modules:
image

In .next/standalone/node_modules:
image

NEXT-1675

Metadata

Metadata

Assignees

No one assigned

    Labels

    OutputRelated to the the output configuration option.bugIssue was opened via the bug report template.linear: nextConfirmed issue that is tracked by the Next.js team.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions