content-collections: Deployment fails after updating to `v0.2.5` of `@content-collections/next`
Hey there, I get a hardly reproducible deployment issue on my server when deploying my Next.js app (via Dockerfile) after updating @content-collections/next.
I can’t really reproduce it on my local machine (even when using the very same Dockerfile) which is why I suspect some intel/arm-specific sub-dependencies might cause it (but this is only a very wild guess).
I’ve everything, different bun/node/next.js versions – It might really be correlated to the update of that dependency. When I downgrade to 0.2.4 everything works fine again.
2025-Mar-01 08:59:34.967688
#15 0.107 $ NEXT_OUTPUT=standalone next build
2025-Mar-01 08:59:34.967688
#15 2.423 ▲ Next.js 15.2.1-canary.4
2025-Mar-01 08:59:34.967688
#15 2.423 - Environments: .env
2025-Mar-01 08:59:34.967688
#15 2.423
2025-Mar-01 08:59:34.967688
#15 2.502 Creating an optimized production build ...
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 Failed to compile.
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/esbuild/lib/main.d.ts
2025-Mar-01 08:59:34.967688
#15 76.70 Module parse failed: Unexpected token (1:7)
2025-Mar-01 08:59:34.967688
#15 76.70 File was processed with these loaders:
2025-Mar-01 08:59:34.967688
#15 76.70 * ./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 * ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
2025-Mar-01 08:59:34.967688
#15 76.70 You may need an additional loader to handle the result of these loaders.
2025-Mar-01 08:59:34.967688
#15 76.70 > export type Platform = 'browser' | 'node' | 'neutral'
2025-Mar-01 08:59:34.967688
#15 76.70 | export type Format = 'iife' | 'cjs' | 'esm'
2025-Mar-01 08:59:34.967688
#15 76.70 | export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx'
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 Import trace for requested module:
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/esbuild/lib/main.d.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/esbuild/lib/ sync ^.*\/.*$
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/esbuild/lib/main.js
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/@content-collections/core/dist/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 ./content-collections/index.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/lib/content-collections/get-pages.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/app/sitemap.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/next/dist/build/webpack/loaders/next-metadata-route-loader.js?filePath=%2Fapp%2Fsrc%2Fapp%2Fsitemap.ts&isDynamicRouteExtension=1!?__next_metadata_route__
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/camelcase/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 Module parse failed: Invalid regular expression: /[\p{Lu}]/: Invalid property name (1:19)
2025-Mar-01 08:59:34.967688
#15 76.70 File was processed with these loaders:
2025-Mar-01 08:59:34.967688
#15 76.70 * ./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 * ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
2025-Mar-01 08:59:34.967688
#15 76.70 You may need an additional loader to handle the result of these loaders.
2025-Mar-01 08:59:34.967688
#15 76.70 > const UPPERCASE = /[\p{Lu}]/u;
2025-Mar-01 08:59:34.967688
#15 76.70 | const LOWERCASE = /[\p{Ll}]/u;
2025-Mar-01 08:59:34.967688
#15 76.70 | const LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu;
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 Import trace for requested module:
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/camelcase/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/@content-collections/core/dist/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 ./content-collections/index.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/lib/content-collections/get-pages.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/app/sitemap.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/next/dist/build/webpack/loaders/next-metadata-route-loader.js?filePath=%2Fapp%2Fsrc%2Fapp%2Fsitemap.ts&isDynamicRouteExtension=1!?__next_metadata_route__
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/esbuild/lib/main.d.ts
2025-Mar-01 08:59:34.967688
#15 76.70 Module parse failed: Unexpected token (1:7)
2025-Mar-01 08:59:34.967688
#15 76.70 File was processed with these loaders:
2025-Mar-01 08:59:34.967688
#15 76.70 * ./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 * ./node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 * ./node_modules/next/dist/build/webpack/loaders/next-swc-loader.js
2025-Mar-01 08:59:34.967688
#15 76.70 You may need an additional loader to handle the result of these loaders.
2025-Mar-01 08:59:34.967688
#15 76.70 > export type Platform = 'browser' | 'node' | 'neutral'
2025-Mar-01 08:59:34.967688
#15 76.70 | export type Format = 'iife' | 'cjs' | 'esm'
2025-Mar-01 08:59:34.967688
#15 76.70 | export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx'
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 Import trace for requested module:
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/esbuild/lib/main.d.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/esbuild/lib/ sync ^.*\/.*$
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/esbuild/lib/main.js
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/@content-collections/core/dist/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 ./content-collections/index.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/lib/content-collections/get-pages.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/lib/content-collections/find-page.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/i18n/utils.ts
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 node:crypto
2025-Mar-01 08:59:34.967688
#15 76.70 Module build failed: UnhandledSchemeError: Reading from "node:crypto" is not handled by plugins (Unhandled scheme).
2025-Mar-01 08:59:34.967688
#15 76.70 Webpack supports "data:" and "file:" URIs by default.
2025-Mar-01 08:59:34.967688
#15 76.70 You may need an additional plugin to handle "node:" URIs.
2025-Mar-01 08:59:34.967688
#15 76.70 at new WebpackError (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:503751)
2025-Mar-01 08:59:34.967688
#15 76.70 at new UnhandledSchemeError (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:492257)
2025-Mar-01 08:59:34.967688
#15 76.70 at <anonymous> (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:408376)
2025-Mar-01 08:59:34.967688
#15 76.70 at anonymous (file:///app/node_modules/next/dist/compiled/webpack/bundle5.js:6:10)
2025-Mar-01 08:59:34.967688
#15 76.70 at processResource (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:408301)
2025-Mar-01 08:59:34.967688
#15 76.70 at processResource (/app/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
2025-Mar-01 08:59:34.967688
#15 76.70 at iteratePitchingLoaders (/app/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
2025-Mar-01 08:59:34.967688
#15 76.70 at runLoaders (/app/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
2025-Mar-01 08:59:34.967688
#15 76.70 at _doBuild (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:408163)
2025-Mar-01 08:59:34.967688
#15 76.70 at <anonymous> (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:82494)
2025-Mar-01 08:59:34.967688
#15 76.70 at _buildModule (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:82211)
2025-Mar-01 08:59:34.967688
#15 76.70 at <anonymous> (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:1378134)
2025-Mar-01 08:59:34.967688
#15 76.70 at anonymous (file:///app/node_modules/next/dist/compiled/webpack/bundle5.js:6:10)
2025-Mar-01 08:59:34.967688
#15 76.70 at _startProcessing (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:1378005)
2025-Mar-01 08:59:34.967688
#15 76.70 at _ensureProcessing (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:1377854)
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 Import trace for requested module:
2025-Mar-01 08:59:34.967688
#15 76.70 node:crypto
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/@content-collections/core/dist/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 ./content-collections/index.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/lib/content-collections/get-pages.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/lib/content-collections/find-page.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/i18n/utils.ts
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 node:fs/promises
2025-Mar-01 08:59:34.967688
#15 76.70 Module build failed: UnhandledSchemeError: Reading from "node:fs/promises" is not handled by plugins (Unhandled scheme).
2025-Mar-01 08:59:34.967688
#15 76.70 Webpack supports "data:" and "file:" URIs by default.
2025-Mar-01 08:59:34.967688
#15 76.70 You may need an additional plugin to handle "node:" URIs.
2025-Mar-01 08:59:34.967688
#15 76.70 at new WebpackError (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:503751)
2025-Mar-01 08:59:34.967688
#15 76.70 at new UnhandledSchemeError (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:492257)
2025-Mar-01 08:59:34.967688
#15 76.70 at <anonymous> (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:408376)
2025-Mar-01 08:59:34.967688
#15 76.70 at anonymous (file:///app/node_modules/next/dist/compiled/webpack/bundle5.js:6:10)
2025-Mar-01 08:59:34.967688
#15 76.70 at processResource (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:408301)
2025-Mar-01 08:59:34.967688
#15 76.70 at processResource (/app/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)
2025-Mar-01 08:59:34.967688
#15 76.70 at iteratePitchingLoaders (/app/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)
2025-Mar-01 08:59:34.967688
#15 76.70 at runLoaders (/app/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)
2025-Mar-01 08:59:34.967688
#15 76.70 at _doBuild (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:408163)
2025-Mar-01 08:59:34.967688
#15 76.70 at <anonymous> (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:82494)
2025-Mar-01 08:59:34.967688
#15 76.70 at _buildModule (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:82211)
2025-Mar-01 08:59:34.967688
#15 76.70 at <anonymous> (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:1378134)
2025-Mar-01 08:59:34.967688
#15 76.70 at anonymous (file:///app/node_modules/next/dist/compiled/webpack/bundle5.js:6:10)
2025-Mar-01 08:59:34.967688
#15 76.70 at _startProcessing (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:1378005)
2025-Mar-01 08:59:34.967688
#15 76.70 at _ensureProcessing (/app/node_modules/next/dist/compiled/webpack/bundle5.js:29:1377854)
2025-Mar-01 08:59:34.967688
#15 76.70
2025-Mar-01 08:59:34.967688
#15 76.70 Import trace for requested module:
2025-Mar-01 08:59:34.967688
#15 76.70 node:fs/promises
2025-Mar-01 08:59:34.967688
#15 76.70 ./node_modules/@content-collections/core/dist/index.js
2025-Mar-01 08:59:34.967688
#15 76.70 ./content-collections/index.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/lib/content-collections/get-pages.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/lib/content-collections/find-page.ts
2025-Mar-01 08:59:34.967688
#15 76.70 ./src/i18n/utils.ts
2025-Mar-01 08:59:34.967688
#15 76.72
2025-Mar-01 08:59:34.967688
#15 76.72 > Build failed because of webpack errors
2025-Mar-01 08:59:34.967688
#15 76.89 error: script "build:standalone" exited with code 1
2025-Mar-01 08:59:34.967688
#15 ERROR: process "/bin/sh -c if [ -f yarn.lock ]; then yarn run build:standalone; elif [ -f package-lock.json ]; then npm run build:standalone; elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build:standalone; elif [ -f bun.lockb ]; then bun run --bun build:standalone; elif [ -f bun.lock ]; then bun run --bun build:standalone; else echo \"Lockfile not found.\" && exit 1; fi" did not complete successfully: exit code: 1
2025-Mar-01 08:59:34.967688
------
2025-Mar-01 08:59:34.967688
> [builder 4/4] RUN if [ -f yarn.lock ]; then yarn run build:standalone; elif [ -f package-lock.json ]; then npm run build:standalone; elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build:standalone; elif [ -f bun.lockb ]; then bun run --bun build:standalone; elif [ -f bun.lock ]; then bun run --bun build:standalone; else echo "Lockfile not found." && exit 1; fi:
2025-Mar-01 08:59:34.967688
76.70 Import trace for requested module:
2025-Mar-01 08:59:34.967688
76.70 node:fs/promises
2025-Mar-01 08:59:34.967688
76.70 ./node_modules/@content-collections/core/dist/index.js
2025-Mar-01 08:59:34.967688
76.70 ./content-collections/index.ts
2025-Mar-01 08:59:34.967688
76.70 ./src/lib/content-collections/get-pages.ts
2025-Mar-01 08:59:34.967688
76.70 ./src/lib/content-collections/find-page.ts
2025-Mar-01 08:59:34.967688
76.70 ./src/i18n/utils.ts
2025-Mar-01 08:59:34.967688
76.72
2025-Mar-01 08:59:34.967688
76.72 > Build failed because of webpack errors
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (8 by maintainers)
Commits related to this issue
- chore: #511 upgrade esbuild to 0.25.0 Closes: #511 — committed to sdorra/content-collections by sdorra 2 years ago
- chore: #511 upgrade esbuild to 0.25.0 Closes: #511 — committed to sdorra/content-collections by sdorra 2 years ago
- chore: #511 upgrade esbuild to 0.25.0 Closes: #511 — committed to sdorra/content-collections by sdorra 2 years ago
- chore: #511 upgrade esbuild to 0.25.0 Closes: #511 — committed to sdorra/content-collections by sdorra 2 years ago
- fix(next): #511 check for ppid 1 only on dev We do the check only in dev mode, because in environment like docker it is common that the build is directly started by the init process (pid 1). https:/... — committed to sdorra/content-collections by sdorra 2 years ago
- fix(next): #511 check for ppid 1 only on dev We do the check only in dev mode, because in environment like docker it is common that the build is directly started by the init process (pid 1). https:/... — committed to sdorra/content-collections by sdorra 2 years ago
- fix(next): #511 check for ppid 1 only on dev We do the check only in dev mode, because in environment like docker it is common that the build is directly started by the init process (pid 1). https:/... — committed to 0x-prince-dev/content-collections by 0x-prince-dev 2 years ago
That’s definitely fixing it! Tested twice this time 😛
@wottpal @alamenai could you please the following pre release?