node-gyp: Errors when doing npm install with Roots Sage (Wordpress theme)

I have been reading and mucking about with this for hours. I am getting the following error when trying to install Roots Sage

I am using Node.Js 4.2.1 Python 2.7.10 And have Visual Studio 2015 community edition installed.

Any advice would be greatly appreciated 😃

C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage [master]> npm install
npm WARN install Couldn't install optional dependency: Unsupported

> bufferutil@1.2.1 install C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage\node_modules\buffer
util
> node-gyp rebuild


C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage\node_modules\bufferutil>if not defined npm_con
fig_node_gyp (node "C:\Users\danielo\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\
bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage\node_modules\bufferutil\build\bufferutil.vcxp
roj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in
 the <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\danielo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\l
ib\build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\danielo\\AppData\\Roaming\\npm\\node_modules\\npm\\no
de_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage\node_modules\bufferutil
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.2.1 Exit status 1

> utf-8-validate@1.2.1 install C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage\node_modules\ut
f-8-validate
> node-gyp rebuild


C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage\node_modules\utf-8-validate>if not defined npm
_config_node_gyp (node "C:\Users\danielo\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-
gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage\node_modules\utf-8-validate\build\validation.
vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the pat
h in the <Import> declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\danielo\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\l
ib\build.js:270:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\danielo\\AppData\\Roaming\\npm\\node_modules\\npm\\no
de_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage\node_modules\utf-8-validate
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate@1.2.1 utf-8-validate@1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate@1.2.1 Exit status 1
C:\Program Files (x86)\xampp\apps\wordpress\htdocs\wp-content\themes\sage [master]>

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

@SaketN there’s seems to be a bug in node-zstd on Windows. You could try another popular ZSTD module: https://www.npmjs.com/package/node-zstandard or the excellent (for general compression) https://www.npmjs.com/package/lzma-native