You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this code works with the webpack portion commented out, but I want it to work with the webpack portion. After leaving in the webpack portion I get the following error
TypeError: Cannot read properties of null (reading 'fn')
at...\node_modules\next\dist\compiled\webpack\bundle5.js:13:29685
at Array.map ()
at AsyncSeriesHookCodeFactory.setup (...\node_modules\next\dist\compiled\webpack\bundle5.js:13:29675)
at Hook.COMPILE [as compile] (...\node_modules\next\dist\compiled\webpack\bundle5.js:13:24094)
at Hook._createCall (...\node_modules\next\dist\compiled\webpack\bundle5.js:13:26635)
at Hook.CALL_ASYNC_DELEGATE (...\node_modules\next\dist\compiled\webpack\bundle5.js:13:25988)
at run (...\node_modules\next\dist\compiled\webpack\bundle5.js:28:140498)
at Compiler.run (...\node_modules\next\dist\compiled\webpack\bundle5.js:28:140794)
at ...\node_modules\pino-webpack-plugin\src\index.js:134:23
at ...\node_modules\next\dist\compiled\webpack\bundle5.js:28:70677
The text was updated successfully, but these errors were encountered:
The below worked build-time, but not runtime. I am getting the same issue as the OP: Cannot read properties of null (reading 'fn').
Posting here as well, in case it helps others in the future:
I spent two days around the same issue, and subsequent ones.
After a lot of trial-and-error I figured out how to make pino work in a Next.js monorepo (Turborepo), with transports, pino-pretty, and functions for messageFormat, customPrettifier, and so on (i.e. non-streamable types).
Minimally reproduceable code (nextjs app)
next.config.js
prettyLogger.ts
package.json
this code works with the webpack portion commented out, but I want it to work with the webpack portion. After leaving in the webpack portion I get the following error
TypeError: Cannot read properties of null (reading 'fn')
at...\node_modules\next\dist\compiled\webpack\bundle5.js:13:29685
at Array.map ()
at AsyncSeriesHookCodeFactory.setup (...\node_modules\next\dist\compiled\webpack\bundle5.js:13:29675)
at Hook.COMPILE [as compile] (...\node_modules\next\dist\compiled\webpack\bundle5.js:13:24094)
at Hook._createCall (...\node_modules\next\dist\compiled\webpack\bundle5.js:13:26635)
at Hook.CALL_ASYNC_DELEGATE (...\node_modules\next\dist\compiled\webpack\bundle5.js:13:25988)
at run (...\node_modules\next\dist\compiled\webpack\bundle5.js:28:140498)
at Compiler.run (...\node_modules\next\dist\compiled\webpack\bundle5.js:28:140794)
at ...\node_modules\pino-webpack-plugin\src\index.js:134:23
at ...\node_modules\next\dist\compiled\webpack\bundle5.js:28:70677
The text was updated successfully, but these errors were encountered: