pnpm docker monorepo #38435
Replies: 4 comments 1 reply
-
Hi, can you provide a reproduction?
This config needs to be set during build to have an affect, was this the case? If so we can investigate closer to make sure this is working properly. We have existing tests for pnpm with standalone mode. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
https://nextjs.org/docs/advanced-features/output-file-tracing#caveats While tracing in monorepo setups, the project directory is used for tracing by default. For next build packages/web-app, packages/web-app would be the tracing root and any files outside of that folder will not be included. To include files outside of this folder you can set experimental.outputFileTracingRoot in your next.config.js. // packages/web-app/next.config.js
module.exports = {
experimental: {
// this includes files from the monorepo base two directories up
outputFileTracingRoot: path.join(__dirname, '../../'),
},
} |
Beta Was this translation helpful? Give feedback.
-
Did anyone got this working? Would be super useful to see a full example of such a Dockerfile for monorepo with pnpm + nextjs |
Beta Was this translation helpful? Give feedback.
-
Hi,
Has anyone been able to deploy a working Nextjs app in a docker image with Pnpm in a monorepo context ?
I want to deploy a nextjs app that depends on a shared package in a monorepo context.
I'm using the following dockerfile.
When trying to run the docker container, I get the following error:
Using
outputFileTracingRoot
experimental property does not change anything.I tried using version 12.2.1-canary.5 after reading about some possible fix. It does not change anything.
Thanks for any clue or direction.
Beta Was this translation helpful? Give feedback.
All reactions