Electron Js: Unable to install using .msi because the path is too long - node.js

I have created a package of electron application by using electron-packager and created MSI project using Visual studio setup project.
Problem
While installing the application I am getting the following error:
I just cannot rename the file or change the location as its a part of node modules.
Please help and suggest what should I do.

You need to package your app into an archive by passing the asar option to electron-packager, that will allow you to avoid the path limit issues and speed up your app startup on Windows.

unless you run latest, you should update node and npm, then rebuild the package.
In npm#3 they worked about that specific issue to flatten the dependency storage folders as much as possible.

Related

How to run angular Application without node.js

I want to create the Angular application using Visual Studio 2019 Angular template in Asp.net core but without Node.js as External tool installation. I found that NuGet package manager also providing Node.js and NPM Packages for building Angular app.
So I created the asp.net core projected and selected Angular Template and add NuGet Node.js 5.3.0 that too is saying in readme.txt "Node.js itself is deployed by NuGet, so there is no need to install it locally on dev machines or build servers."
But when I tried to run the angular project then build is failing.
If anyone knows the solution with exact steps so please help me on this.
There is one extra step is required after the Nuget Node.js package installed in the project, which is missing in the node.js document.
Step: Add node.js installed path in PATH Environment Variable (One-time activity per dev system)
e.g: set PATH=%PATH%; C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VisualStudio\NodeJs
or node.js install path can be set manually in the PATH Environment Variable

how install libvips NetVips in Azure cloud - Error:Unable to load DLL \ 'libvips-42.dll\ ' or one of its dependencies

I can run an azure function app with libvips library from localhost for this function app - manipulation for images output correctly. I setup my local environment by saving libvips win64 in a folder in my windows 10 PC, added libvips bin folder to environment PATH and in Visual studio I installed nuget NetVips, NetVips.Native.win-64.
This is the method I run :
var rgbThumbnail = NetVips.Image.ThumbnailBuffer(thisRGBImgBytes, 256);
I'm trying to run the .Net Core 3.1 V3 function app from azure. When I run from cloud I get "Error:Unable to load DLL \ 'libvips-42.dll\ ' or one of its dependencies. The specified module could not be found . (0x8007007E)"
I had expected for the nuget packages in VS to suffice when uploading to the function app in azure. I've looked on the internet how to install libvips in Azure but I can't find any reference. Can someone please help?
thank you
Had similar problems.
Libvips is using more then one dll.
Download from
https://libvips.github.io/libvips/
Add all dll's then remove one by one.
Or directly identify the missing dll.
In Visual Studio, right-click your Azure Functions project, then click on Manage NuGet Packages, and install the following packages:
NetVips (latest version)
NetVips.Native (latest version)
That should solve the issue related to missing DLLs.

Visual Studio Installer is not installing node.js

In Visual Studio Installer, I selected the Node.js development option. It runs successfully. But, if I try to run cmd node -v. It tells me node does not exist.
I tried a few other things including uninstalling and reinstalling the Node.js development option in VS Installer. Plus installing the latest version of node from the website.
However, when I try to run the pre-packed Angular solution that comes with VS 2017 I have issues. The solution will not even start.
The best I have been able to do is install Node 6.10.3. Once I do that, the web site comes up. But, I get a JavaScript error in the vendor.js file. I am able to continue but I get this error when I try navigate to another menu item. Plus the Hot Module Replacement does not seem to be working. (It does not automatically recompile my TypeScript file if I made a change).
I think the key is getting the Node.js development option installed correctly since I am able to run the pre-packed Angular solution on another PC and the Hot Module Replacement works fine.
Please let me know if anyone has any ideas on how to resolve.
I had a similar, if not the same, issue. Check the Visual Studio installation directory (2017 Professional in this case) for Node:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\NodeJs
If the executable is there, add the directory to your PATH.

Visual Studio 2015 - Bower not working

I'm trying to start a new ASP.Net MVC 5 project using the new Web Development features included in VS 2015. So far I wasn't able to include any bower packages through the IDE. I've made some tweaks regarding npm, git and bower to include the proxy configuration.
The strange thing is that using node console to run bower works well
However when you try the equivalent with the VS external tool
"C:\Program Files\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\bower.cmd" install angular
it fails
This is running behind a corporate NTLM authenticated proxy, which is bypassed with CNTLM. But I don't think has much to do as the Node version of bower works perfectly fine. You can see the configuration
.npmrc
registry=http://registry.npmjs.org/
proxy=http://127.0.0.1:8128
http_proxy=http://127.0.0.1:8128
https_proxy=http://127.0.0.1:8128
.gitconfig
[http]
proxy = http://127.0.0.1:8128
sslVerify = false
[https]
proxy = http://127.0.0.1:8128
[url "http://"]
insteadOf = git://
.bowerrc
{
"directory": "library",
"registry": "http://bower.herokuapp.com",
"proxy":"http://127.0.0.1:8128/",
"https-proxy":"http://127.0.0.1:8128/"
}
Any thoughts?
[Edit]
The problem ended up being something about permissions. When running VS 2015 "as administrator" it worked fine. It seems some of the operations when moving files from the temporary download folder to the project folder was being prevented (user profiles are created on a network share in this environment, that's what I believe is causing such a mess).
Visual Studio uses a sandboxed version of node / NPM by default for Bower rather than the globally installed version. This means any config you made for the global versions won't apply to VS. You can change this so that Visual Studio uses your globally installed version instead which I can see has no problems getting through your firewall.
To do this, go to Tools -> Options and look for this configuration page:
Add an entry for node:
Make sure you drag it higher in the list so that it's before the Web Tools\External entry (that's where VS installs it's sandboxed versions of Node and NPM).
Hope that does the trick.
As mentioned in the post itself, it ended up being a permissions issue, when running VS 2015 as administrator the problem disappeared.
Had the same issue, but instead of installing a separate bower, I changed the .bowerrc file in the project root directory to:
{
"directory": "wwwroot/lib",
"proxy":"http://127.0.0.1:3128/",
"https-proxy":"http://127.0.0.1:3128/"
}

Node.js on Azure Website 500 status

I am trying to get a node.js (meanjs) site running on Azure. The site work on my local environment with no errors. But after deployment when I go to my site I get a 500 error in my network tab in chrome. There are no obvious errors to me.
I used https://groups.google.com/forum/#!topic/meanjs/LrHmE43RSvA to walk me through how to set it up with the azure cli.
It is also setup to deploy form my github.
In the Azure portal the deployment dose not fail. I have read through the log and tried to find a problem but im hardly know where to start. Reading through it there are some things that look weird to me for instance. (The log is long and past the character limit or I would have posted it all.)
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [D:\home\site\repository\node_modules\bson\build\binding.sln]
and there are lots of
npm WARN unmet dependency
Then they all get processed and the files get copped to the wwwroot and finishes successfully.
Some of the things i have tried are changing the deployment branch, deleting the website and starting over. I have
Let me know if there is any thing else that I can add to this post I really want to get this working.
Thanks for any help.
Edit**
I added bson to the .gitignore and got a new error. I am also getting some new errors below is what has changed.
bson#0.2.18 install D:\home\site\repository\node_modules\bson
(node-gyp rebuild 2> builderror.log) || (exit 0)
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere.
[D:\home\site\repository\node_modules\bson\build\binding.sln]
npm WARN prefer global coffee-script#1.8.0 should be installed with -g
npm ERR! Error: ENOENT, chmod >'D:\home\site\repository\node_modules\flatiron\bin\flatiron'
npm ERR! If you need help, you may report this entire log,
I also added a .npmignore to the directory but it is blank. I have tried adding both the bson and flatiron to the .gitignore but that did not change the error.
From the log you posted, I can see it failed when azure tried to install an NPM module named bson during the deployment, because there's no VC++ compiler in the virtual machine your azure website located.
It worked well in your machine since you have VC++ installed.
To fix, you'd better compile this module (bson) in your machine (x86 or x64 based on which one selected in your azure website), make this module as included under node_modules folder in your .gitignore so that it will be uploaded when you commit your code.
I have a blog post mentioned this problem and I was using Node.js SQL Server Driver as an example. It also needs VC++ compile.
http://blog.shaunxu.me/archive/2012/11/16/install-npm-packages-automatically-for-node.js-on-windows-azure-web.aspx

Resources