Skip to content

The msvs_version option doesn't work from .npmrc nor from environment variable #2698

Closed
@CMCDragonkai

Description

@CMCDragonkai

I'm using the latest node-gyp.

I've found that msvs_version doesn't actually work from .npmrc nor from environment variables.

Here's what happens.

  1. If you set $env:npm_config_msvs_version=2019; node-gyp configure, what happens is that the gyp.opts contains msvs-version, but not msvs_version. This leads the configure command to assume that the env variable hasn't been set.
  2. If you set npm config set msvs_version 2019 --location project, it also doesn't work, instead nothing is read at all, the gyp.opts does not contain msvs_version at all.
  3. If you set node-gyp configure --msvs_version=2019 then it does work, and it shows up on gyp.opts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions