Skip to content

Standalone output in pnpm monorepo has invalid symlinks in node_modules #40482

Answered by remorses
revmischa asked this question in Help
Discussion options

You must be logged in to vote

I think you have to use outputFileTracingRoot if you are using a monorepo (the path points to the root of the monorepo)

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  swcMinify: true,
  output: "standalone",
  experimental: { outputFileTracingRoot: path.join(__dirname, '../'), }
};

module.exports = nextConfig;

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@michrome
Comment options

@revmischa
Comment options

@michrome
Comment options

@qhantom
Comment options

@revmischa
Comment options

Answer selected by revmischa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
Output (export/standalone) Related to the the output option in `next.config.js`.
4 participants
Converted from issue

This discussion was converted from issue #40414 on September 12, 2022 14:11.