Skip to content
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

No way to silence warnings #6672

Closed
rochdev opened this issue Nov 13, 2018 · 9 comments
Closed

No way to silence warnings #6672

rochdev opened this issue Nov 13, 2018 · 9 comments
Assignees
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+. triaged

Comments

@rochdev
Copy link

rochdev commented Nov 13, 2018

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Using yarn --silent is not silent since it displays a lot of errors related to package deprecation.

For example:

warning workspace-aggregator-7f30cf29-537f-48a2-86b0-a91668bf6021 > hapi-f3323ea51e133c445b5c74b7fce4def22ad0f7bb > hapi@8.5.0: This version is no longer maintained. Please upgrade to the latest version of the framework.

If the current behavior is a bug, please provide the steps to reproduce.

Add hapi@2 to package.json and run yarn install

What is the expected behavior?

Either yarn --silent should be truly silent, or a log level configuration should be added to add the ability to ignore warnings.

Please mention your node.js, yarn and operating system version.

  • macOS 10.13.6
  • Node v8.11.1
  • yarn 1.9.4
@ngryman
Copy link

ngryman commented Jul 12, 2019

Hey guys, I know you must have a huge backlog but this one seems to be a quick one with a decent amount of support (25 👍). Is there any chance you could take a quick look at it?

Thanks!

@ragozin-n
Copy link

ragozin-n commented Sep 17, 2019

+ 1

@mohsen1
Copy link

mohsen1 commented Nov 7, 2019

On a Unix system (Linux, macOs) you can do some grepping!

yarn install 2> >(grep -v warning 1>&2)

this cleaned up our logs in CI at least.

@victorwads
Copy link

+1

1 similar comment
@ftmmohd2000
Copy link

+1

sam-hosseini added a commit to sam-hosseini/dotfiles that referenced this issue Dec 4, 2020
Until yarnpkg/yarn#6672 is resolved,
this kind of hacky solutions is the only way not to go bananas with
yarn's unactionable-for-me-warning-messages.
sam-hosseini added a commit to sam-hosseini/dotfiles that referenced this issue Dec 24, 2020
Until yarnpkg/yarn#6672 is resolved,
this kind of hacky solutions is the only way not to go bananas with
yarn's unactionable-for-me-warning-messages.
@paul-soporan
Copy link
Member

Closing as you can now silence specific warnings in v2 via logFilters.

https://yarnpkg.com/getting-started/migration

@h0jeZvgoxFepBQ2C
Copy link

Why is this closed? Also the link doesnt show how to silcen deprecations?

@ildella
Copy link

ildella commented Sep 12, 2023

Why is this closed? Also the link doesnt show how to silcen deprecations?

The documentation link does. You should add this to your yarnrc config yaml

logFilters: [{
  code: 'YN0002',
  level: 'discard',
}]

Which ironically is json :)

@rubberTres
Copy link

I just added

"build-production": "DISABLE_ESLINT_PLUGIN=true react-scripts build"

to scripts in package.json and works just fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+. triaged
Projects
None yet
Development

No branches or pull requests