NPM Install (Windows) throws .SLN errors...? - windows

I'm working with Node.js (and a couple other node modules) and I've come across this problem in multiple different projects now...
With a lot (not all, but many) of node modules, when I try to install a module I get a similar error to this:
C:\...\.node-gyp\0.8.16\deps\uv\include\uv.h(55): fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory [C:\...\AppData\Roaming\npm\node_modules\soap\node_modules\node-expat\build\binding.sln]
Project : warning PRJ0018: The following environment variables were not found: [C:\...\AppData\Roaming\npm\node_modules\soap\node_modules\node-expat\build\binding.sln]
With more than coincidental frequency, Node-Gyp seems to have something to do with it, I think... However I can't find anything suggesting what exactly would cause this.
I'm running:
-Node 0.8.x (Which I need for one of our custom modules),
-NPM 1.1.69
-Windows 7 x86
Examples of which modules I'm trying to use:
-npm install soap
-npm install nodetime

Stumbled upon the reason. For Node-gyp to install properly on a Windows machine, you need Visual Studio C++ 2010 (Express or full suite). At a glance, I assumed this meant the MS C++ Redistributable packages, not the IDE.
I have VS2008 installed, but 2010 is the minimum requirement. Hope this helps saves someone else from a headache or two in the future, though!

Related

LESS in Web Compiler for Visual Studio 2019 stopped to work

It worked for years.
Yesterday for no reason (?) I'm not able to compile LESS files any more.
I tried to
reinstall the Web Compiler extension,
reinstall Web Essentials 2019 extension,
reinstall the whole Visual Studio 2019 for 3 times,
start a new project from scratch
I do not know if some automatic update happened under the hoods, but basically, every time I try to compile a LESS file I get:
module.js:471
throw err;
^
Error: Cannot find module 'C:\Users\igor\AppData\Local\Temp\WebCompiler1.12.394\node_modules\less\bin\lessc'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:390:7)
at startup (bootstrap_node.js:150:9)
at bootstrap_node.js:505:3
Thanks for any help!
For VS2017 and VS2019:
Uninstall the Web Compiler extension
Delete* the directory C:\Users\<username>\AppData\Local\Temp\WebCompiler1.12.394
Install Web Compiler
I do not know why the "lessc" file disappeared.
* From cmd.exe:
rd /S %LOCALAPPDATA%\Temp\WebCompiler1.12.394
From a PowerShell prompt:
rm -r $env:LOCALAPPDATA\Temp\WebCompiler1.12.394
How I found the solution: I attempted to re-create the .vsix file from the GitHub repository for the Web Compiler extension so that I could get the lessc file; I had installed Node.js and all its associated gubbins. Trying to use the node_modules.7z generated by build.cmd in the Web Compiler files didn't work in the end because there are several deprecated things in it - I ended up with the error described in 3.10: Breaks IE Compat Option. So I thought: oh dear, it is all broken, why not just delete the directory and try the install again?
I deleted the C:\Users\<username>\AppData\Local\Temp\WebCompiler1.12.394 folder and ran the compilation from Task Runner Explorer which recreated the folder without having to reinstall Web Compiler.
Maybe it is related to also having the BuildWebCompiler 1.12.405 NuGet package installed in the project.
I was able to fix a similar problem with a "node-sass" file missing from the Web Compiler (although the entire bin folder was empty) by performing the following actions:
close Visual Studio 2019
delete the C:\Users<username>\AppData\Local\Temp\WebCompiler1.12.394 folder
restart Visual Studio.
When I restarted VS, the folder was recreated with all the necessary files back where they needed to be.
When I ran into the issue I had just came back to work after taking a little over a week off. At least for me, I think a program on my computer that automatically cleans up unused temp files may have been the culprit.

Cordova error - "npm does not support Node.js v0.12.9"

When I build my Cordova project in Visual Studio, it gives me an error "npm does not support Node.js v0.12.9" even though I have v6.10.3 installed. I tried the latest versions of npm, both x86 & x64.
It used to work, not sure what broke it.
I looked through the build output again, and noticed that there were other errors too, although I can't remember what they were. It could be I had to increase the build output verbosity using Tools->Options->Projects and Solutions->Build and Run.
Looking at the xml in the .jsproj to see what the build process was doing, showed that it was running the C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ApacheCordovaTools\Packages\vs-t‌​ac\install.js script. I put in console.log statements to see exactly what was happening, and somewhere along the way my error disappeared, not sure how.
So I can't give a precise answer, but this should help other users to debug their issues.
I had the same problem. Somehow checking the "Use globally installed Cordova version" in config.xml did the trick for me.

Windows 10 SDK won't install to Visual Studio

I've been trying to get Visual Studio and the Windows 10 SDK to work for over a week now. First I couldn't install Visual Studio. That problem was resolved by uninstalling EVERYTHING vaguely related to VS2015, thanks to manually going through everything, but also the Visual Studio "TotalUninstaller".
Plot twist: Now that I've managed to get VS2015 installed and running, I can't get the SDK to install. I've selected it with the installation process, tried to modify VS after, tried to install it with the Standalone installer, but none of it works. Every time, the installer doesn't notice anything wrong, all the tools appear in the start menu, a new "Program Files (x86)/WindowsKits/10.0" folder appears, with all the correct files, but VS can't open any UWP projects, can't create new any, and the SDK doesn't appear in the Extensions list.
When I uninstalled everything, there was only one thing I couldn't get rid of: "Windows 10 for Mobile Image - 10.0.10240.0". It just opens, runs for a second, and closes, achieving nothing in the process. As I couldn't get rid of this, I manually deleted any "Windows Kits" related folder in Program Files, Program Files (x86), ProgramData, and anything in the AppData folder. But this piece of fluffy garbage didn't leave my installed programs list. Could this have something to do with not being able to install the Windows 10 SDK correctly?
I looked in the install logs, and this is the only error I saw:
[371C:398C][2016-08-08T21:13:35]i301: Applying execute package: {7a68448b-9cf2-4049-bd73-5875f1aa7ba2}, action: Install, path: C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe, arguments: '"C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe" -quiet -burn.related.patch -burn.ignoredependencies={248fcd1e-5ee1-421d-893f-ec0a94dd7b01} -burn.ancestors={248fcd1e-5ee1-421d-893f-ec0a94dd7b01}'
[371C:398C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to create embedded process atpath: C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe
[371C:398C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to run embedded bundle.
[371C:398C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to run bundle as embedded from path: C:\ProgramData\Package Cache\{7a68448b-9cf2-4049-bd73-5875f1aa7ba2}\vsupdate_KB3022398.exe
[371C:398C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to execute EXE package.
[287C:137C][2016-08-08T21:13:35]e000: Error 0x80070003: Failed to configure per-machine EXE package.
It appears in every log when I try to install vs2015 with the right option ticked, or when I use the standalone installer. I've looked in C:\ProgramData\Package Cache and there is no {7a68448b-9cf2-4049-bd73-5875f1aa7ba2} folder, and none of the other folders contain "vsupdate_KB3022398.exe". It looks like this is the root of the problem.
EDIT: I've created the folder that was missing and added "vsupdate_KB3022398.exe" to it (found it online, hosted on a Microsoft server), and there are no more errors left. However, the problem still isn't fixed. The SDK simply refuses to show up. I think I'm going to have to do a clean install.
I had the issue of Windows 10 SDK 14393 failing to install on Windows 7 OS. This problem occurred when installing as part of Visual Studio 2015 and also running the Standalone Installer for the Windows 10 SDK 14393. According to the logs, the Windows Desktop Extension SDK failed to install.
As a work-around I installed Windows 10 SDK 10586 (Installed successfully)
Then I installed Windows 10 SDK 14393 (Installed successfully)
Both versions of the Windows 10 SDK appear as choices under Target Platform Version in Visual Studio 2015 for me.
Apparently the Windows 10 SDK 14393 installer is missing something which it requires to run successfully on Windows 7. (Something that must be present in the previous version)
Sorry for the difficulty. There are 2 known issues that are causing 'Fatal Error' in the Windows SDK install.
See the Windows SDK Tools Issues Forum.
You probably have (had) a pre-release of the SDK and one of the contracts installed is causing MDMerge to fail during setup. Uninstalling the prerelease version of the SDK should avoid this issue.
Thanks,
kevin
I had the MDMerge problem, after uninstalling all previous Windows 10 SDK toolkits, still couldn't install. Fixed it by moving the contents of: "C:\Program Files (x86)\Windows Kits\10", ran the installer again and it installed fine.
This is what I did and it kind of worked for me. Remove everything in the linker ( PROJECT -> LINKER -> Input -> Additional Dependencies, as can be seen in this screenshot

Linking errors with boost, VS2010, and CMake

I have searched high and low for this answer. I have tried suggestions to similar problems posted on Stack and other sites. My toolchain consists of an x64 machine with windows 7, visual studio 2010, opencv 2.4, qt 4.8, and boost. I configure all of my projects using CMake, which finds all of these libraries and includes and creates my visual studio project. I have compiled two versions of boost, a 32-bit version build in the command line and placed in \boost\boost_1_47_0\lib\win32, and a 64-bit compiled in the Windows SDK v7.1 64-bit compiler and stored in \boost\boost_1_47_0\lib\x64. Everything in the project compiles fine with the exception of boost. I get a compiler error:
fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-1_47.lib'
As a reminder, CMake is handling all of my linking and it properly locates this lib and adds it to the visual studio project. I can verify this by looking at Properties->Linker->Command Line. Here, in addition to files representing other libraries, it has listed:
"C:\Tools\boost\boost_1_47_0\lib\x64\boost_filesystem-vc100-mt-1_47.lib"
"C:\Tools\boost\boost_1_47_0\lib\x64\boost_program_options-vc100-mt-1_47.lib"
"C:\Tools\boost\boost_1_47_0\lib\x64\boost_date_time-vc100-mt-1_47.lib"
"C:\Tools\boost\boost_1_47_0\lib\x64\boost_thread-vc100-mt-1_47.lib"
I can suppress this error by manually adding my boost\boost_1_47_0\lib\x64 directory to Properties->Linker->General->Additional Library Dependencies. This compiles without error. However, when I go to run the application, I am met with a system error that tells me:
The program can't start because boost_filesystem-vc100-mt-1_47.dll is missing from your computer. Try reinstalling the program to fix this problem.
In this /x64 directory I have:
boost_filesystem-vc100-mt-1_47.dll
boost_filesystem-vc100-mt-1_47.lib
libboost_filesystem-vc-100-mt-1_47.dll
Any insight would be incredibly appreciated. Thanks!
To solve the runtime error:
Add the location of the dll(s) to the PATH environment variable.
For example on my machine:
set PATH=%PATH%;c:\users\chris\boost_regex-vc140.1.63.0.0\lib\native\address-model-32\lib
or copy the dll(s) to a directory already in the PATH
See here: https://msdn.microsoft.com/en-us/library/7d83bc18.aspx?f=255&MSPPError=-2147217396

Libwbxml compiling on Win32 environment

I've downloaded libwbxml source package from http://sourceforge.net/projects/libwbxml/files/libwbxml/0.11.0/ and followed instructions in the INSTALL file, trying to compile it for Windows environment. However, everytime I build the solution (I'm using VS 2005), I get several error messages like this:
fatal error C1083: Cannot open include file: 'wbxml_config.h': No such file or directory
I've searched throughout the web and could not find a definitive solution for it.
Based on my experience, building on Windows with Visual studio 98 will cause no error.
You may try to build another variant, wbxml2-0.9.2.tar, from sourceforce.net, it only causes error at test phase but the library and 2 tools can be built fine.

Resources