pinojs / pino-webpack-plugin

MIT License
19 stars 9 forks source link

No serializer registered for CommonJsRequireDependency #193

Open magnusriga opened 2 months ago

magnusriga commented 2 months ago

I am using the following setup, which works when building, but fails runtime with the following warning and error:

Initial Warning:

<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|javascript/dynamic|/home/.../node_modules/.pnpm/next@14.2.5_@babel+core@7.25.2_babel-plugin-macros@3.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.77.8/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/home/.../node_modules/.pnpm/next@14.2.5_@babel+core@7.25.2_babel-plugin-macros@3.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.77.8/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[3].use[0]!/home/.../node_modules/.pnpm/pino@9.3.2/node_modules/pino/pino.js|rsc': No serializer registered for CommonJsRequireDependency
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> Array { 24 items } -> CommonJsRequireDependency
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|javascript/dynamic|/home/.../node_modules/.pnpm/next@14.2.5_@babel+core@7.25.2_babel-plugin-macros@3.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.77.8/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/home/.../node_modules/.pnpm/next@14.2.5_@babel+core@7.25.2_babel-plugin-macros@3.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.77.8/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[3].use[0]!/home/.../node_modules/.pnpm/pino@9.3.2/node_modules/pino/pino.js|action-browser': No serializer registered for CommonJsRequireDependency
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> Array { 24 items } -> CommonJsRequireDependency
<w> [webpack.cache.PackFileCacheStrategy] Skipped not serializable cache item 'Compilation/modules|javascript/dynamic|/home/.../node_modules/.pnpm/next@14.2.5_@babel+core@7.25.2_babel-plugin-macros@3.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1_sass@1.77.8/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[20].oneOf[1].use[0]!/home/.../node_modules/.pnpm/pino@9.3.2/node_modules/pino/browser.js|middleware': No serializer registered for CommonJsRequireDependency
<w> while serializing webpack/lib/cache/PackFileCacheStrategy.PackContentItems -> webpack/lib/NormalModule -> Array { 5 items } -> CommonJsRequireDependency

Subsequent Error:

Failed to compile.

../../node_modules/.pnpm/pino@9.3.2/node_modules/pino/pino.js
No template for dependency: CommonJsRequireDependency

Import trace for requested module:
../../node_modules/.pnpm/pino@9.3.2/node_modules/pino/pino.js
../../packages/logger/src/pino.ts
...

Any idea what is going on and how to fix it?

Thank you.