-
Notifications
You must be signed in to change notification settings - Fork 118
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
reading 'stringifySym' doesn't work with next.js #293
Comments
Thanks for reporting! Can you provide steps to reproduce? We often need a reproducible example, e.g. some code that allows someone else to recreate your problem by just copying and pasting it. If it involves more than a couple of different file, create a new repository on GitHub and add a link to that. A fix would also be highly appreciated. I have no clue why that broke Next.js. |
@mcollina I managed to reproduce it with the sample Next.js TS app they suggest in their website basically, the changes are:
import HttpLogger from 'pino-http';
import Logger from 'pino';
export const rootLogger =
Logger({
transport: { target: 'pino-pretty' },
level: 'debug',
})
export const httpLogger = HttpLogger({
logger: rootLogger
});
import { rootLogger } from '../lib/logging';
import '../styles/global.css'
import { AppProps } from 'next/app'
const logger = rootLogger.child({ context: 'analytics' });
export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />
} run and navigate to With Take the |
You are using a browser build of the logger with pink-http, which is not supported. |
@mcollina what do you mean browser build? how can I fix that? |
I'm not a Next.js user so I don't really know. This module is to be used on the server and you are running it inside a browser, or browser like environment, |
We are using Next.js.
After upgrading from
8.3.3
to8.4.0
, we are getting the below error when loading any page.It seems to be related to this commit.
my env:
macos and ubuntu
node: v18.12.1
npm: 9.5.0
next.js: ^13.4.13
The text was updated successfully, but these errors were encountered: