Skip to content

Config File nodeOptions.warnings: false not working #58929

Description

@JakobJingleheimer

Version

24.3.0

Platform

macOS Arm

Subsystem

No response

What steps will reproduce the bug?

  1. Create a file leveraging an experimental feature (ex module mocks)
  2. Run the file via CLI with the --no-warnings flag
    1. Notice no experimental warning is printed
  3. Remove the flag from the CLI command, and add "warnings: false" to node.config.json (and include via that CLI flag)
    1. Notice an experimental warning IS printed

How often does it reproduce? Is there a required condition?

100%

What is the expected behavior? Why is that the expected behavior?

nodeOptions.warnings: false behaves the same as its CLI flag --no-warnings

What do you see instead?

Warnings

Additional information

No response

Activity

  1. added
    configIssues and PRs related to Node.js configuration and feature settings.
    on Jul 3, 2025
  2. marco-ippolito commented on Jul 3, 2025

    @marco-ippolito
    Member

    Can you provide your config file json? There is no --warnings flag. There is --no-warnings that can be either true or false

  3. added
    needs more infoIssues awaiting more information or a reproducible example from the author.
    on Jul 5, 2025
  4. geeksilva97 commented on Jul 18, 2025

    @geeksilva97
    Contributor

    I think I got the issue, @marco-ippolito . This occurs when the boolean option is true by default. It is not adding the negation flag. We have to ensure it.

    I opened a PR with the fix.

  5. removed
    needs more infoIssues awaiting more information or a reproducible example from the author.
    on Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    configIssues and PRs related to Node.js configuration and feature settings.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions