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

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

Open
aliamerj opened this issue Mar 20, 2024 · 0 comments

Comments

@aliamerj
Copy link
Owner

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 
@aliamerj aliamerj changed the title Build fails due to missing 'autoprefixer' module in Next.js 13 Build fails with Docker due to missing 'autoprefixer' module in Next.js 13 Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant