Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting D9025 warnings and C1083 errors from node.js modules... I'm out of ideas
    primarykey
    data
    text
    <p>First I must be clear, I am by no means a javascript guru.. I'm simply very enthusiastic about it and I enjoy learning new things.</p> <p>I'm running Windows 7 Ultimate x64 with SP1, Windows updates are on, node.js is v0.10.22. I've tried this process individually with Visual Studio C++ Express versions 2008, 2010 and 2012, each .net framework is installed in order with updates. I also tried each version's latest service pack after their initial clean installs.</p> <p>So, in theory I should at some point have had each possible combination... And I did double check environment variables and reboot for each version, just for good measure. Yet it still fails the same way.</p> <p>I'm managed to track this back as far as the <code>node-gyp rebuild</code> command in numerous modules (<code>node-ant</code>, <code>sails</code>, etc..), which throws out:</p> <pre><code>E:\Temp\node-test\node_modules\node-ant\node_modules\usb&gt;node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild Build started 2013/12/06 19:46:52. __________________________________________________ Project "E:\Temp\node-test\node_modules\node-ant\node_modules\usb\build\binding.sln" (default targets): Target ValidateSolutionConfiguration: Building solution configuration "Release|x64". Target Build: Target usb_bindings: VCBuild.exe E:\Temp\node-test\node_modules\node-ant\node_modules\usb\build\usb_bindings.vcproj "Release|x64" cl : Command line warning D9025: overriding '/MT' with '/MD' cl : Command line warning D9025: overriding '/MT' with '/MD' cl : Command line warning D9025: overriding '/MT' with '/MD' cl : Command line warning D9025: overriding '/MT' with '/MD' e:\temp\node-test\node_modules\node-ant\node_modules\usb\src\node_usb.h(5): fatal error C1083: Cannot open include file: 'string': No such file or directory e:\temp\node-test\node_modules\node-ant\node_modules\usb\src\node_usb.h(5): fatal error C1083: Cannot open include file: 'string': No such file or directory e:\temp\node-test\node_modules\node-ant\node_modules\usb\src\node_usb.h(5): fatal error C1083: Cannot open include file: 'string': No such file or directory Project : warning PRJ0018: The following environment variables were not found: Done building target "usb_bindings" in project "binding.sln" -- FAILED. Done building target "Build" in project "binding.sln" -- FAILED. Done building project "binding.sln" -- FAILED. Build FAILED. cl : Command line warning D9025: overriding '/MT' with '/MD' cl : Command line warning D9025: overriding '/MT' with '/MD' cl : Command line warning D9025: overriding '/MT' with '/MD' cl : Command line warning D9025: overriding '/MT' with '/MD' Project : warning PRJ0018: The following environment variables were not found: e:\temp\node-test\node_modules\node-ant\node_modules\usb\src\node_usb.h(5): fatal error C1083: Cannot open include file: 'string': No such file or directory e:\temp\node-test\node_modules\node-ant\node_modules\usb\src\node_usb.h(5): fatal error C1083: Cannot open include file: 'string': No such file or directory e:\temp\node-test\node_modules\node-ant\node_modules\usb\src\node_usb.h(5): fatal error C1083: Cannot open include file: 'string': No such file or directory 5 Warning(s) 3 Error(s) Time Elapsed 00:00:00.17 gyp ERR! build error gyp ERR! stack Error: `msbuild` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\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:789:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd E:\Temp\node-test\node_modules\node-ant\node_modules\usb gyp ERR! node -v v0.10.22 gyp ERR! node-gyp -v v0.11.0 gyp ERR! not ok npm ERR! usb@0.2.3 preinstall: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the usb@0.2.3 preinstall script. npm ERR! This is most likely a problem with the usb package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls usb npm ERR! There is likely additional logging output above. npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-ant" "--msvs_version=auto" npm ERR! cwd E:\Temp\node-test npm ERR! node -v v0.10.22 npm ERR! npm -v 1.3.14 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! E:\Temp\node-test\npm-debug.log npm ERR! not ok code 0 </code></pre> <p>My latest and possible most informative attempt, I discovered I could specify the Visual Studio build tools to try use with...</p> <pre><code>E:\Temp\node-test&gt;npm install node-ant --msvs_version=auto </code></pre> <p>...of which it seems <code>=auto</code> tries to detect the version from the environment variables(?).</p> <p>I've tried specifying each of the following versions I found listed in the <code>C:\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSVersion.py</code> file, <code>=2008</code>, <code>=2010</code> and <code>=2012</code>, the ones that don't even get as far as the error listed above, fail even sooner with slight variations of the following error, complaining about project versions:</p> <pre><code>E:\Temp\node-test&gt;npm install node-ant --msvs_version=2008 npm http GET https://registry.npmjs.org/node-ant npm http 304 https://registry.npmjs.org/node-ant npm http GET https://registry.npmjs.org/usb npm http 304 https://registry.npmjs.org/usb &gt; usb@0.2.3 preinstall E:\Temp\node-test\node_modules\node-ant\node_modules\usb &gt; node-gyp rebuild E:\Temp\node-test\node_modules\node-ant\node_modules\usb&gt;node "C:\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild build/binding.sln(1): Solution file error MSB5014: File format version is not recognized. MSBuild can only read solution files between versions 7.0 and 9.0, in clusive. gyp ERR! build error gyp ERR! stack Error: `msbuild` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\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:789:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "C:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd E:\Temp\node-test\node_modules\node-ant\node_modules\usb gyp ERR! node -v v0.10.22 gyp ERR! node-gyp -v v0.11.0 gyp ERR! not ok npm ERR! usb@0.2.3 preinstall: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the usb@0.2.3 preinstall script. npm ERR! This is most likely a problem with the usb package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls usb npm ERR! There is likely additional logging output above. npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:\\nodejs\\\\node.exe" "C:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-ant" "--msvs_version=2008" npm ERR! cwd E:\Temp\node-test npm ERR! node -v v0.10.22 npm ERR! npm -v 1.3.14 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! E:\Temp\node-test\npm-debug.log npm ERR! not ok code 0 </code></pre> <p>The <a href="https://github.com/schakko/node-usb" rel="nofollow noreferrer">GitHub repo</a> has been quiet for a really long time so I figure asking there may be pointless (I'm going to search the repo forks though, just noticed there are 32 of them), but in each report Google helps me find for the <code>C1083: Cannot open include file:</code> line, the rest of the line lists a specific file it can't find.. As opposed to my <code>'string'</code> section.</p> <p>This is my first SO question, so let me know if you need more details. I'm a Java software tester by day so I'm no stranger to using debug tools. I'm truly out of ideas here now, anyone able to point me in the direction of a solution for this headache...?</p> <p>[edit] For reference, here are a few of the similar issues I've found, each of which I've tried the suggestions made as closely as possible.</p> <ul> <li><a href="https://stackoverflow.com/questions/14278417/cannot-install-node-modules-that-require-compilation-on-windows-7-x64-vs2012">Cannot install node modules that require compilation on Windows 7 x64/VS2012</a></li> <li><a href="https://github.com/TooTallNate/node-gyp/issues/227" rel="nofollow noreferrer">https://github.com/TooTallNate/node-gyp/issues/227</a></li> <li><a href="http://wishmesh.com/2011/04/fatal-error-c1083-cannot-open-include-file-ammintrin-h-no-such-file-or-directory/" rel="nofollow noreferrer">http://wishmesh.com/2011/04/fatal-error-c1083-cannot-open-include-file-ammintrin-h-no-such-file-or-directory/</a></li> <li><a href="https://github.com/nonolith/node-usb/issues/3" rel="nofollow noreferrer">https://github.com/nonolith/node-usb/issues/3</a></li> </ul> <p>And the most similar (unanswered) one in the official repo issues list.</p> <ul> <li><a href="https://github.com/nonolith/node-usb/issues/19" rel="nofollow noreferrer">https://github.com/nonolith/node-usb/issues/19</a></li> </ul> <p>[edit2] Apologies for the edits, but one other point that may or may not be important.. I do have CygWin installed, and included in my system path. Honestly I feel more comfortable on Linux, so I naturally use *nix terminal commands inside Windows' <code>cmd</code> prompt. Could this be causing some node modules to incorrectly detect a *nix system for something the Windows build tools need...?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload