naviapps / create-nw-react-app

Create NW.js React apps with no build configuration.
MIT License
144 stars 14 forks source link

Can't start on ubuntu #8

Closed ft115637850 closed 6 years ago

ft115637850 commented 6 years ago

When npm start on ubuntu, it has following error:

Error: currentPlatform selected (linux64) doesn't exist in selected platforms (win32, win64, osx64) at NwBuilder.runApp (/home/wwuser/my-nw-app/node_modules/nw-builder/lib/index.js:739:19) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

naviapis commented 6 years ago

Please add linux64 to nwBuilder.platforms of package.json.

The README.md is incomplete, but nwBuilder is the build setting. https://github.com/nwjs-community/nw-builder#options

ft115637850 commented 6 years ago

This is resolved.

ft115637850 commented 6 years ago

By the way, do you know why the icon on the windows title bar can't show on ubuntu?

naviapis commented 6 years ago

It seems that favicon is displayed in the windows title bar. index.html The correct setting is here. https://github.com/nwjs/nw.js/wiki/Icons

ft115637850 commented 6 years ago

I put the favicon.ico on ./public, add configuration in package.json as below: "window": { "icon": "./public/favicon.ico" }

The favicon can't show on ubuntu, but it can show on Windows10. You can check my repo on https://github.com/ft115637850/my-nw-app.

naviapis commented 6 years ago

The extension is PNG / JPG only. https://github.com/nwjs/nw.js/wiki/Icons#title-bar-icon Please put the logo.png in ./public, and set it as follows. "window": { "icon": "./logo.png" }

logo

ft115637850 commented 6 years ago

Thanks for your suggestion. But logo.png shows on windows task bar. But I want to show it on windows title bar. image

I think this is controlled in index.html. But I am not sure whether this is an issue for NW to show it on ubuntu, because it can show on Windows.

naviapis commented 6 years ago

It is also not displayed in macOS. I can not check ubuntu so I do not know any more.

Please try to ask because it is in the range of nw.js. https://groups.google.com/forum/#!forum/nwjs-general https://github.com/nwjs/nw.js/issues

Alternatively you can delete the frame and create it from scratch. http://docs.nwjs.io/en/latest/For%20Users/Advanced/Transparent%20Window/