nwjs taskbar icon on Windows for NW.js is a red square, can't set icon in package.json
See original GitHub issueNWJS Version : 0.42.5 SDK version Operating System : Windows 10 (x64)
Expected behavior
You should be able to set the icon associated with NW.js using the provided method of setting “icon” in the “window” section of the package.json file.
Actual behavior
The icon associated with the NW.js application is a red square and cannot be set using the provided methods in the package.json. See screenshot in the comments below.
How to reproduce
Download 0.42.5 SDK for Windows x64 and set your package.json to be like:
NOTE: This is not a path problem as it works fine in 0.40.
{
"name": "app-name-here"
"main": "index.html",
"window": {
"icon": "image.png"
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:30 (9 by maintainers)
Top Results From Across the Web
How to change taskbar icon in NW.js? - Stack Overflow
It's in the right place package.json:window:icon. The problem is the path where your icon.png is located. Change to something like ...
Read more >NW.js v0.42.6 Released
... window size limit in package.json don't work in some cases (#7248); nw2: taskbar icon on Windows for NW.js is a red square,...
Read more >How To Add Taskbar Icon To Node Webkit Application
This lets you open NW.js, then immediately launch the Webkit Developer Tools, ... icon on Windows for NW.js is a red square, can't...
Read more >All of the Documentation | Electron - GitHub Pages
app. Control your application's event lifecycle. Process: Main. The following example shows how to quit the application when the last window ...
Read more >Chapter 2. Laying the foundation for your first desktop ...
Building a file explorer in both NW.js and Electron; Setting up your application; ... cd lorikeet-nwjs touch package.json. Running on Windows?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to reproduce it in another system. This is now fixed in git and will be available in the next nightly build.
I don’t think a sample is really needed of my icon because the same icon works fine in NW.js 0.40.0 and in much older releases. I’ve been using the same icon for my app for a lot of years.
Here is my icon:
Just running NW.js demonstrates the behavior. Here is a screenshot of it. Notice that the task bar icon is a red square. When you attempt to set the icon in the package.json it doesn’t work.