Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile issue on Windows 8: Cannot open include file: 'qos.h' #18

Closed
joeyrobert opened this issue Sep 18, 2014 · 8 comments
Closed

Compile issue on Windows 8: Cannot open include file: 'qos.h' #18

joeyrobert opened this issue Sep 18, 2014 · 8 comments

Comments

@joeyrobert
Copy link

This seemed like a unique compile time issue on Windows 8. This is occurring with Node v0.10.28. The same issue also occurs when I upgrade to v0.10.32.

C:\Users\Joey\Documents\GitHub\mobileapp\native>npm install -g sleep
npm http GET https://registry.npmjs.org/sleep
npm http 304 https://registry.npmjs.org/sleep
npm http GET https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/mkdirp

> sleep@1.1.8 install C:\Users\Joey\AppData\Roaming\npm\node_modules\sleep
> node build.js || nodejs build.js


C:\Users\Joey\AppData\Roaming\npm\node_modules\sleep>node "C:\Program Files
\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-
gyp.js" rebuild --global sleep
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
  sleep.cc
C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h(882): fatal error
 C1083: Cannot open include file: 'qos.h': No such file or directory [C:\Users\
Joey\AppData\Roaming\npm\node_modules\sleep\build\node_sleep.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail
ed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild" "--global" "sleep"
gyp ERR! cwd C:\Users\Joey\AppData\Roaming\npm\node_modules\sleep
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.0
gyp ERR! not ok
[sleep]: Error: Failed to execute 'node-gyp.cmd rebuild --global sleep' (1)
'nodejs' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! sleep@1.1.8 install: `node build.js || nodejs build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sleep@1.1.8 install script.
npm ERR! This is most likely a problem with the sleep package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node build.js || nodejs build.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls sleep
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "sleep"
npm ERR! cwd C:\Users\Joey\Documents\GitHub\mobileapp\native
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Joey\Documents\GitHub\mobileapp\native\npm-debug.log
npm ERR! not ok code 0

C:\Users\Joey\Documents\GitHub\mobileapp\native>
@erikdubbelboer
Copy link
Owner

Looks like this is a problem with your build environment. C:\Program Files (x86)\Windows Kits\8.1\Include\um\winsock2.h seems to include qos.h.
winsock2.h is included by node and v8.

@magoodah
Copy link

Has anyone found a solution to this issue ? I'm running into the same problem and I can't seem to find a solution for it. I'm running Windows 8.1 and many different node packages (mongodb, nightmarejs, etc. ) won't install.

@erikdubbelboer
Copy link
Owner

I guess you can try downloading qos.h from the microsoft FTP and placing it in C:\Program Files (x86)\Windows Kits\8.1\Include\um\

@toly-k
Copy link

toly-k commented Feb 27, 2015

Since this is one of the top links on Google for "Cannot open include file: 'qos.h'"
In a fresh Windows 8.1 environment you need to install Windows Software Development Kit (SDK) for Windows 8.1
https://msdn.microsoft.com/en-us/library/windows/desktop/bg162891.aspx

@sregmip
Copy link

sregmip commented Jun 12, 2015

I had the similar problem of Cannot open include file: 'qos.h' while installing sqlite3 on my machine. I uninstalled the VS 2010 and installed VS 2013 Express for Window 'Desktop' and it solved my problem.

@kherock
Copy link

kherock commented Jul 8, 2015

On Windows 10, installing the Windows Software Development Kit (SDK) for Windows 8.1 solved my issues. Installing either VS 2013 Express for Windows or VS 2013 Express for Windows Desktop and the kit seems to work.
I also ran npm config set msvs_version 2013 --global just to be safe.

@catsocks
Copy link

Is Visual Studio 2015 still unsupported? "node-gyp" is unable to find CLexe ( TRK0005 )

Installed Visual Studio 2013 alongside 2015 and its running fine now, also without having to set npm config set msvs_version 2013 --global

@erikdubbelboer
Copy link
Owner

See: nodejs/node-gyp#555 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants