I’m trying to get a local dev env set up for making contributions to the Vscode repo. As part of the set-up instructions, you’re supposed to set a npm config option “msvs_version”. Attempting to do so results in an error;
npm error `msvs_version` is not a valid npm option
I’ve made sure the C++ Desktop Dev options, and Node options are installed via the Visual Studio Installer. Npm is up-to-date for my version of Node. I’m running Windows 11.
I also tried creating the option manually via npm config edit
, however it does not preserve it. Does anyone know how to resolve this?
Full error log:
0 verbose cli C:Program Filesnodejsnode.exe C:Program Filesnodejsnode_modulesnpmbinnpm-cli.js
1 info using [email protected]
2 info using [email protected]
3 silly config:load:file:C:UsersDrakeAppDataRoamingnvmv20.11.0node_modulesnpmnpmrc
4 silly config:load:file:C:UsersDrake.npmrc
5 silly config:load:file:C:Program Filesnodejsetcnpmrc
6 verbose title npm config set msvs_version 2022
7 verbose argv "config" "set" "msvs_version" "2022"
8 verbose logfile logs-max:10 dir:C:UsersDrakeAppDataLocalnpm-cache_logs2024-05-02T18_31_23_501Z-
9 verbose logfile C:UsersDrakeAppDataLocalnpm-cache_logs2024-05-02T18_31_23_501Z-debug-0.log
10 info config set "msvs_version" "2022"
11 verbose stack Error: `msvs_version` is not a valid npm option
11 verbose stack at Config.set (C:UsersDrakeAppDataRoamingnvmv20.11.0node_modulesnpmlibcommandsconfig.js:150:15)
11 verbose stack at Config.exec (C:UsersDrakeAppDataRoamingnvmv20.11.0node_modulesnpmlibcommandsconfig.js:115:20)
11 verbose stack at Config.cmdExec (C:UsersDrakeAppDataRoamingnvmv20.11.0node_modulesnpmlibbase-cmd.js:138:17)
11 verbose stack at C:UsersDrakeAppDataRoamingnvmv20.11.0node_modulesnpmlibnpm.js:92:55
11 verbose stack at Object.start (C:UsersDrakeAppDataRoamingnvmv20.11.0node_modulesnpmnode_modulesproc-loglibindex.js:101:21)
11 verbose stack at Npm.exec (C:UsersDrakeAppDataRoamingnvmv20.11.0node_modulesnpmlibnpm.js:92:17)
11 verbose stack at module.exports (C:UsersDrakeAppDataRoamingnvmv20.11.0node_modulesnpmlibclientry.js:65:29)
12 verbose cwd C:UsersDrake
13 verbose Windows_NT 10.0.22631
14 verbose node v20.11.0
15 verbose npm v10.7.0
16 error `msvs_version` is not a valid npm option
17 verbose exit 1
18 verbose code 1
19 error A complete log of this run can be found in: C:UsersDrakeAppDataLocalnpm-cache_logs2024-05-02T18_31_23_501Z-debug-0.log