Skip to content

Build fails with Docker due to missing 'autoprefixer' module in Next.js 13 #1

Description

@aliamerj

Describe the bug

When attempting to build a Next.js 13 application, the process fails with errors indicating that the 'autoprefixer' module cannot be found. The issue persists even after explicitly installing 'autoprefixer' as a development dependency.

To Reproduce

Steps to reproduce the behavior:
open compose.yaml and change the target: dev to target: prod

Expected behavior

The build process should complete successfully without errors related to missing 'autoprefixer' module.

33.65 Require stack:
33.65 - /usr/src/app/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js
33.65 - /usr/src/app/node_modules/next/dist/build/webpack/config/blocks/css/index.js
33.65 - /usr/src/app/node_modules/next/dist/build/webpack/config/index.js
33.65 - /usr/src/app/node_modules/next/dist/build/webpack-config.js
33.65 - /usr/src/app/node_modules/next/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js
33.65 - /usr/src/app/node_modules/next/dist/build/collect-build-traces.js
33.65 - /usr/src/app/node_modules/next/dist/build/index.js
33.65 - /usr/src/app/node_modules/next/dist/cli/next-build.js
33.65 - /usr/src/app/node_modules/next/dist/lib/commands.js
33.65 - /usr/src/app/node_modules/next/dist/bin/next
33.65     at Module._resolveFilename (node:internal/modules/cjs/loader:1144:15)
33.65     at /usr/src/app/node_modules/next/dist/server/require-hook.js:54:36
33.65     at Function.resolve (node:internal/modules/helpers:187:19)
33.65     at loadPlugin (/usr/src/app/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:49:32)
33.65     at /usr/src/app/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:157:56
33.65     at Array.map (<anonymous>)
33.65     at getPostCssPlugins (/usr/src/app/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:157:47)
33.65     at async /usr/src/app/node_modules/next/dist/build/webpack/config/blocks/css/index.js:124:36
33.65     at async /usr/src/app/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js:51:40
33.65     at async Span.traceAsyncFn (/usr/src/app/node_modules/next/dist/trace/trace.js:105:20)
33.65 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions