0

I am using Node: 4.8.0/6.11.0, npm: 2.15.11 in Windows 8.1 environment.

Prerequisite:

  1. I have Visual Build Tools installed (http://landinghub.visualstudio.com/visual-cpp-build-tools)
  2. set msvs_version=2015
  3. set VCTargetsPath="C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140"

Here is the problem: when I run npm i buffertools, I got a MSB4102 error

enter image description here

Any idea?

stijn
  • 34,664
  • 13
  • 111
  • 163
Terence
  • 652
  • 11
  • 34

1 Answers1

2

That Import path is messed up, it contains " in the middle of the path, because the vcxproj likely file contains

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

and that now expands to

"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140"\Microsoft.Cpp.Default.Props because you passed quotes when setting VCTargetsPath.

Are you sure you need to set VCTargetsPath, isn't this done automatically? And in any case, if you set it, omit the quotes.

stijn
  • 34,664
  • 13
  • 111
  • 163