Skip to content

Error: Cannot find module '../lightningcss.linux-x64-musl.node' #17958

Open
@therealsras

Description

@therealsras
Image I had workaround working. but I see it will solve this but no.
#37 3.296 > next build
#37 3.296
#37 4.772    ▲ Next.js 15.3.1
#37 4.773    - Environments: .env.production
#37 4.840    Creating an optimized production build ...
#37 59.97 Failed to compile.
#37 59.97
#37 59.98 app/layout.tsx
#37 59.98 An error occurred in `next/font`.
#37 59.98
#37 59.98 Error: Cannot find module '../lightningcss.linux-x64-musl.node'
#37 59.98 Require stack:
#37 59.98 - /app/node_modules/lightningcss/node/index.js
#37 59.98 - /app/node_modules/@tailwindcss/node/dist/index.js
#37 59.98 - /app/node_modules/@tailwindcss/postcss/dist/index.js
#37 59.98 - /app/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js
#37 59.98 - /app/node_modules/next/dist/build/webpack/config/blocks/css/index.js
#37 59.98 - /app/node_modules/next/dist/build/webpack/config/index.js
#37 59.98 - /app/node_modules/next/dist/build/webpack-config.js
#37 59.98 - /app/node_modules/next/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js
#37 59.98 - /app/node_modules/next/dist/build/collect-build-traces.js
#37 59.98 - /app/node_modules/next/dist/build/index.js
#37 59.98 - /app/node_modules/next/dist/cli/next-build.js
#37 59.98     at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
#37 59.98     at /app/node_modules/next/dist/server/require-hook.js:55:36
#37 59.98     at Module._load (node:internal/modules/cjs/loader:981:27)
#37 59.98     at Module.require (node:internal/modules/cjs/loader:1231:19)
#37 59.98     at mod.require (/app/node_modules/next/dist/server/require-hook.js:65:28)
#37 59.98     at require (node:internal/modules/helpers:177:18)
#37 59.98     at Object.<anonymous> (/app/node_modules/lightningcss/node/index.js:22:22)
#37 59.98     at Module._compile (node:internal/modules/cjs/loader:1364:14)
#37 59.98     at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
#37 59.98     at Module.load (node:internal/modules/cjs/loader:1203:32)
#37 59.98
#37 59.98 lib/fonts.ts
#37 59.98 An error occurred in `next/font`.
#37 59.98
#37 59.98 Error: Cannot find module '../lightningcss.linux-x64-musl.node'
#37 59.98 Require stack:
#37 59.98 - /app/node_modules/lightningcss/node/index.js
#37 59.98 - /app/node_modules/@tailwindcss/node/dist/index.js
#37 59.98 - /app/node_modules/@tailwindcss/postcss/dist/index.js
#37 59.98 - /app/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js
#37 59.98 - /app/node_modules/next/dist/build/webpack/config/blocks/css/index.js
#37 59.98 - /app/node_modules/next/dist/build/webpack/config/index.js
#37 59.98 - /app/node_modules/next/dist/build/webpack-config.js
#37 59.98 - /app/node_modules/next/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js
#37 59.98 - /app/node_modules/next/dist/build/collect-build-traces.js
#37 59.98 - /app/node_modules/next/dist/build/index.js
#37 59.98 - /app/node_modules/next/dist/cli/next-build.js
#37 59.98     at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15)
#37 59.98     at /app/node_modules/next/dist/server/require-hook.js:55:36
#37 59.98     at Module._load (node:internal/modules/cjs/loader:981:27)
#37 59.98     at Module.require (node:internal/modules/cjs/loader:1231:19)
#37 59.98     at mod.require (/app/node_modules/next/dist/server/require-hook.js:65:28)
#37 59.98     at require (node:internal/modules/helpers:177:18)
#37 59.98     at Object.<anonymous> (/app/node_modules/lightningcss/node/index.js:22:22)
#37 59.98     at Module._compile (node:internal/modules/cjs/loader:1364:14)
#37 59.98     at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
#37 59.98     at Module.load (node:internal/modules/cjs/loader:1203:32)
#37 59.98
#37 59.98
#37 59.98 > Build failed because of webpack errors
#37 60.14 npm notice
#37 60.14 npm notice New major version of npm available! 10.8.2 -> 11.3.0
#37 60.14 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.3.0
#37 60.14 npm notice To update run: npm install -g npm@11.3.0
#37 60.14 npm notice
#37 ERROR: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1

------
> [web-app-dev builder 5/5] RUN npm run build:
59.98     at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
59.98     at Module.load (node:internal/modules/cjs/loader:1203:32)
59.98
59.98
59.98 > Build failed because of webpack errors
60.14 npm notice
60.14 npm notice New major version of npm available! 10.8.2 -> 11.3.0
60.14 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.3.0
60.14 npm notice To update run: npm install -g npm@11.3.0
60.14 npm notice
------
failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
Error ❌ failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1

What version of Tailwind CSS are you using?

For example: v4.1.6

What build tool (or framework if it abstracts the build tool) are you using?

For example: Next.js 15.3.1

What version of Node.js are you using?
dockerfile: node:18-alpine

For example: Chrome, Safari, or N/A
Ubuntu Docker

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions