Next.js: Disable stdout clearing

Created on 4 Mar 2019  路  12Comments  路  Source: vercel/next.js

(There may be a way to do this currently, but after asking a few times on Spectrum and looking through the changes for adding Webpackbar I haven't found anything)

Is your feature request related to a problem? Please describe.

When running Next in something like docker-compose the refreshing output constantly clears and mangles the log output.

Describe the solution you'd like

I'd like a way to disable this so that log output is just a stream and not constantly rerendered.

Edit: This includes local development as well.

feature request

Most helpful comment

8.0.3's output is _different_, but it still clears the log when rebuilding in dev

All 12 comments

@mcmillion what version of Next.js are you on? Is this problem still present on 8.0.3?

馃 For me, this behavior actually started after I went to version 8. Would love to have more control over logging altogether though.

Yeah I'm currently on 8.0.0, so I'm not sure how trying 8.0.3 helps me unless it added some kind of configuration to disable this.

I guess I should add that my original question was specifically in regards to local development. When running a dev environment in docker (or something like Foreman) that merges the log output from multiple processes/containers, Webpackbar seems to obliterate that output every time it runs.

@Timer I actually just came here trying to figure out how to get this progressbar back. We switched from 8.0.0 to 8.0.3 and noticed the progressbar was gone. Is it possible to enable this based on an envvar we set perhaps? That way it can be enabled for developer machines, but disabled on CI?

It appears the progressbar was removed with a change released in 8.0.2. Rolling back to 8.0.1 brought it back. Switching to 8.0.2 removed it.

8.0.3's output is _different_, but it still clears the log when rebuilding in dev

Same issue. It clears almost all output. With webpackbar we don't have any issues before. Very clear interface, good readable.
This new "profiler" removes a lot of debug informations.
For example all info from Webpack are cleared. No Info in terminal from webpack-bundle-analyzer or inspectpack and so on.

I experience the same issue when running Next.js in dev mode with Honcho (Python port of Foreman) alongside other processes.

Next.js clears the console every time it recompiles, and I cannot see log messages from my other processes that happened just before recompilation.

missing-log-messages

I would also appreciate this feature.

Also (I'm not sure how related this is), was there a recent change that disabled the compilation time output? After upgrading to next8 I no longer get the Compiled successfully in x ms type logs in my console.

As a workaround you can use yarn dev 2> next-errors.log.
Alternately with yarn dev > next.log the error pipe is not redirected so you will see only see errors.
Or log both with yarn dev 2>&1 > next.log

Please 馃憤 my PR ^ for exposure.

Was this page helpful?
0 / 5 - 0 ratings