React's webpack is showing up in the console

Viewed 284

i have a this little issue. I have a new laptop, and I decided to do react project. I installed the Node's stable version, installed the the npm create-react-app globally, and created a new project using this command npx create-react-app tip-calculator.

Everything was set up for me, only deleted a few files on the src folder, and kept the essentials (index.js, app.js and index.css).

My issues, is on my previous laptop, when doing projects, the webpack (is what i think it is) didn't show up in the console, and on the new laptop, it shows, and I would like it removed.

This is a freshly baked react project, so I didn't touch it's code, aside from the files I deleted.

Screenshot of the issue

1 Answers

It's not an issue, it's expected behavior by react-scripts because these logs are hardcoded in react-scripts and currently, there are no options for disabling them. You have probably had an older version of create-react-app in your previous laptop which might have not logged this information on the console.

What is really happening is that you are running react-scripts with npm start and react-scripts are logging webpack logs.

There is also this question which is similar to yours about running react-scripts silently.

If you really don't want to see the output you can redirect it to null:

  • Linux & Mac: npm start > /dev/null
  • Windows CMD: npm start > null
  • Windows Powershell: npm start > $null
Related