Skip to content

node.config.json doesn't respect optionally-valued or aliased options #57960

Description

@avivkeller

Version

v23.11.0

Platform

Microsoft Windows NT 10.0.26100.0 x64

Subsystem

No response

What steps will reproduce the bug?

Create a node.config.json with the following content:

{
  "nodeOptions": {
    "inspect": true
  }
}

Run:

> node --experimental-default-config-file
Unable to resolve "true": unknown node or service

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

N/A

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

The expected behavior would be that the configuration file understands that setting a flag to true is the equal to applying node --flag, whereas setting a flag to an alternative value is the equal of applying node --flag=value, even for aliased options.

What do you see instead?

When supplying true,

Unable to resolve "true": unknown node or service

When supplying a string value, like 127.0.0.1:

Invalid value for --inspect
node.config.json: invalid content

Additional information

No response

Activity

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.confirmed-bugIssues and PRs for confirmed bugs.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions