npm install error: “The build tools for v120 (Platform Toolset = 'v120') cannot be found”

后端 未结 5 1592
無奈伤痛
無奈伤痛 2021-01-31 20:22

While running an npm install that required a node-gyp rebuild, the following build error was thrown:

MSB8020: The build tools for v120 (Platf

5条回答
  •  情歌与酒
    2021-01-31 20:41

    I wanted to add a comment to 2Toad's answer but stackoverflow doesn't let me. You can set the msvs_version globally with this command:

    npm config set msvs_version 2015 --global
    

    This saves you putting it in each projects config object.

提交回复
热议问题