electron-builder refuses to work with 256 by 256 icon - node.js

Im trying to build a electron app using electron builder and I am getting the following error: Error: image /home/runner/work/granio/granio/build/icon.ico must be at least 256x256. This error is suprising because I tripled checked that the icon is in fact, 256x256. Is this a bug with electron? Icon Size
Thanks,
Evan

I had the same problem with docker.
Because I put my electron project in a directory not isolated.
I used an Apache's HTTP server (https://hub.docker.com/_/httpd) and I put the project in the directory usr/local/apache/ with others files.
I suspect that to build an electron project you must have a directory with only project's files. Otherwise, electron-builder throws that error.
I hope this help someone!

Related

Uncaught TypeError: Cannot read property 'id' of undefined at registerNgModuleType

I have a problem that when I clone my repository of the app in angular, after installing the node_module and executing the ng serve it throws me this error and I have already looked for a thousand and one answers but none are correct, the app is from angular 8.1 and my angular global is 11 I do not know if it can influence, but it is with the only angular project that happens to me, at times the ng serve lifts the project and it can be seen but I barely make a modification and I give it save this error appears, I need help that advice me give?
enter image description here
I had the same problem.
I solved the problem by disabled the Angular Language Service for that workspace.
I hope this solves your problem
I could find the error, it turns out that VS code as editor every time I ran the npm install and then the ng serve ran perfect, one time I make a modification and give it ctrl + s it bugea my project and when I run the ng serve me again I get the error, so I had to clone my repository again and work with sublime text and it did not give me the error. It must have been some vscode plugin that makes this happen but it is with very few projects.

NodeJS Windows 10 geolocation module throws error in electron when the app starts

I was using module "#nodert-win10-rs4/windows.devices.geolocation" in an electronjs app which was working fine. Later I installed a node module and rebuilt all the modules. Now it stopped working and throwing error. The previous version of that module ( "#nodert-win10-rs4/windows.devices.geolocation") was 1.0.0, Thus I reinstalled it, new version of the module is "0.3.2" but still error. Even i tried this in fresh new electron quick start app and I see the same error. I'm adding here the screenshot of the package.json and the error. (FYI - The module is installed and rebuilt without any error although it has some warning, I've added a screenshot of the installation/built too). Really appreciate any help/suggestions.
I saw other posts with similar errors but I already took the actions mentioned there.
Thanks
Musa
N.B - Cross posted here
I ran into the same issue and here is how I resolved it.
Copy the windows.devices.geolocation into your electron app folder and update the dependencies to point to the location of the folder. You need to this line added to your package.json of your Electron App
"windows.devices.geolocation": "file:windows.devices.geolocation"
Navigate to the newly copied folder and build your NodeRT "addon" to match your Electron version. See this post here NodeRT with Electron
node-gyp rebuild --target=4.0.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell
Run npm install at the the top level Electron app.

Exception could not locate binding file after updating electron version

I'm working on updating my project from using electron version 1.2.5
to the newest electron at this time which is 1.7.7 (atleast it was when I downloaded it). My node version 6.9.1.
I've encountered a problem when I start my project with this new electron version,
the error in general is about "could not locate the binding files. and it mostly regards the async module.
There is also some part of the exception regarding node-etcd module which I use in my project (version 5.0.3)
I found some information about this type of exception online but most of them says stuffs about rebuilding some node module using some npm commands which I didn't quiet understand. I tried to install async module again in a new folder and replace it (with its deps) in the node modules folder im currently using for my project, but I still got the same error.
I'm working in an offline enviorment where I can't take my project "out" to a computer with internet access, I can only bring things from the web to my project (like installing in some folder and then copying that into my project) so any npm or other commands that require web connection are not available to me directly on my work computer. (I can only use them in a different computer and copy the results to a flash drive and bring them to th
Here's 2 pictures of the error (sorry about the quality, its the best I could get):
First part of error
Second part of error
The solution that fixed the problem in my case was going into node_modules - > deasync - > index.js
Before line 31 I added a newline (next to the binding line)
and wrote:
modPath = __dirname;
This solution is hacky, it was accually ly found by an associate a while back, so I am not sure why it works, it might be an issue in deasync, but it fixed the problem.

Problems with webpack build, using angular-cli

I am using angular-cli with built-in webpack and encounter the following problem: if I use ng serve --host 0.0.0.0 --port 3000 everything works fine, but when I try to build the app (no matter developer mode or production) with ng build and then put it into my nginx, not a single route works and every attempt of browser to download image, which is used on start page, ends with 404 error. What am I doing wrong? Googled a ton of stuff and nothing seems to be a solution.
Some additional info:
angular-cli: 1.0.0-beta.21
node: 6.9.4
os: win32 x64
So for everyone who encounters this problem, after some research I found this:
1) To solve problem with styles not loading properly, add encapsulation: ViewEncapsulation.None to each of your components #Component() decorator, this way it's going to bundle styles properly. More info here: https://angular.io/docs/ts/latest/guide/component-styles.html#!#loading-styles
2) Make sure all your images are stored inside assets folder. If you store them in some other folder like images, just put that images folder inside assets
3) And for information about paths not working on page reload, have a look at this question and read some information about strategies: Angular 2 : 404 error occur when i refresh through Browser
Also this link has config examples https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-configure-your-server-to-work-with-html5mode

ERROR: Can't set up Node.js core modules, when creating Node.js Express app on Webstorm

I am getting the following error when I try to create a Node.js Express app in Webstorm:
Can't set up Node.js v0.12.2 Core Modules Failed to create
C:\Users\Christina.WebStorm10\system\extLibs\nodejs-v0.12.2-src\core-modules-sources\lib\constants.js.
See idea.log for details (on the main menu "Help | Show Log in ...")
Does anyone know why?
Thanks in advance!
The reason is that access to this file is denied.
Remove nodejs-v0.xx.x-src folder, its default location is:
C:\Users\.IntelliJIdea14\system\extLibs
In the settings dialog select Languages & Frameworks > Node.js and NPM
Click on Configure button
In the new dialog accept defaults which is Download from the Internet.
Click on Configure button
I was having the same problem whenever I tried to download the modules Although I didnt find the reason for this I found a solution. Try to download Node.js from their website and use the Get Modules from Directory Option in the cofig window.
Then point the path to c:/Programs and Files(x86)/Node/npm and you should be good to go ;)

Resources