Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PNPM and output standalone issue running pnpm run dev after pnpm rub build #72888

Open
Mr-Vipi opened this issue Nov 16, 2024 · 2 comments
Open
Labels
bug Issue was opened via the bug report template. Developer Experience Issues related to Next.js logs, Error overlay, etc. Output (export/standalone) Related to the the output option in `next.config.js`.

Comments

@Mr-Vipi
Copy link

Mr-Vipi commented Nov 16, 2024

Link to the code that reproduces this issue

https://github.com/Mr-Vipi/test-pnpm

To Reproduce

  1. clone the project I provided, is created from pnpm create [email protected]
    there i changed only output: standalone in the next config.
  2. run pnpm run build. It should terminate succesfully
  3. run pnpm run dev once the build is finished and youl'll get the error

Current vs. Expected behavior

I get this error: Error: Cannot find module 'next/dist/pages/_app' instead of being able to run the local server.

I have to delete the node modules and install them again to run the local server but once I have to make a build should repeat the process of deleting the node modules.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
  Available memory (MB): 16280
  Available CPU cores: 8
Binaries:
  Node: 22.11.0
  npm: N/A
  Yarn: N/A
  pnpm: 9.12.3
Relevant Packages:
  next: 14.2.18 // An outdated version detected (latest is 15.0.3), upgrade is highly recommended!
  eslint-config-next: 14.2.18
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.6.3
Next.js Config:
  output: standalone

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

Developer Experience, Output (export/standalone)

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

next dev (local), next build (local)

Additional context

I tested as well with ▲ Next.js 15.0.4-canary.13, and the error persists
I tested with npm and got no error so it seams related to pnpm

@Mr-Vipi Mr-Vipi added the bug Issue was opened via the bug report template. label Nov 16, 2024
@github-actions github-actions bot added Developer Experience Issues related to Next.js logs, Error overlay, etc. Output (export/standalone) Related to the the output option in `next.config.js`. labels Nov 16, 2024
@Mr-Vipi Mr-Vipi changed the title PNPM and output standalone issue running pnpm dev after pnpm build PNPM and output standalone issue running pnpm run dev after pnpm rub build Nov 16, 2024
@nhducit
Copy link
Contributor

nhducit commented Nov 18, 2024

have you tried repro with the latest/canary version?

@Mr-Vipi
Copy link
Author

Mr-Vipi commented Nov 18, 2024

Additional context

I tested as well with ▲ Next.js 15.0.4-canary.13, and the error persists
I tested with npm and got no error so it seams related to pnpm

@nhducit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Developer Experience Issues related to Next.js logs, Error overlay, etc. Output (export/standalone) Related to the the output option in `next.config.js`.
Projects
None yet
Development

No branches or pull requests

2 participants