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

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.

Related

Visual Studio saying null when try to run code

so basically i tried running code in visual studio but it says null and doesn't open command prompt and also says build failed (https://i.stack.imgur.com/Gi5GT.png)
how to run the code with no errors
If you have python downloaded, then set the python environment. Click on Add Environment. Then browse to in install location.
This will resolve your issue.
You should download python separately
Just go to https://www.python.org/downloads/ and get the latest python version, then restart VS
It should work, my friend had same problem and this solved it

How to fix libcmcurl.dll not being found when trying to use cmake?

Haven't found anything online as most threads are focused of libcurl rather than libcmcurl.
For some reason my Cmake stopped working in Windows 10. I have tried uninstalling it and reinstalling, however even basic commands like cmake --version return the following error message:
cmake.exe - System Error
The code execution cannot procees because libcmcurl.dll was not found.
Reinstalling the program may fix the problem.
I tried running cmake --version when cmake was uninstalled and got the same error message.
Not sure what the source of the error was since even google refuses to show results for this file (defaults to libcurl.dll), however I think I solved the issue by repairing the Visual Studio 2019 install.
Open Visual Studio Installer
Click More
Repair
Worked after that.

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.

Unable to compile U-SQL scripts using latest Microsoft.Azure.DataLake.USQL.SDK 1.4.190703

After updating to the latest USQL SDK (v 1.4.190703) we started getting the following error when trying to compile any script:
* Error : (-1,-1) 'GetVersionedSdkPath: unexpected layout of SCOPE CPP SDK. SCOPE_CPP_SDK=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\SDK\ScopeCppSDK. DATADIR=. SDK DIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\SDK\ScopeCppSDK. CppSdk.Tag=vc15.'
Details: 'A system failure has occurred during code generation.'
* Compile failed !
Execution failed !
The previous version (1.4.190528) and all other previous ones work just fine. I´ve tried changing the ScopeCppSDK environment variable to use the one from visual studio 2019, but the same happens
There seems to be an issue with the C++ SDK but I couldn´t find any newer version of it, and the release notes for the U-SQL SDK don´t specify anything in particular
Any help would be appreciated!
Can you please delete the contents of “C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\SDK\ScopeCppSDK” and reinstall USQL SDK.
If this does not help, clean installation of VS/SDK should help.
Also, you should NOT set ScopeCppSDK environment variable, unless you know exactly what you are doing.
If you are using "DataPartitionedOutput" this may be the problem for VS2019 and U-SQL. Microsoft said that they will fix this in the new release in September.
Our company request Microsoft for a private fix and they give us since one of our project was depending on it.

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

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!

Resources