create-nw-react-app icon indicating copy to clipboard operation
create-nw-react-app copied to clipboard

Can't create a project

Open tuliofh01 opened this issue 2 years ago • 5 comments

I get the following error when running create-nw-react-app my-app:

npm ERR! code ENOVERSIONS npm ERR! No versions available for nw-install

tuliofh01 avatar May 20 '23 04:05 tuliofh01

Same for me

Username4212 avatar May 23 '23 14:05 Username4212

Yep, same issue here. Also making it unable to use nw-builder

patrick-patel avatar May 23 '23 18:05 patrick-patel

It is because when the version of nw-builder was 3.8.6 nw-install had existed. I think version-up of nw-builder to 4.x.x which doesn't depend on nw-install will solve the problem, but since I am not familiar with npm, I don't know how to edit and make a PR. Anyone can help us?

syehoonkim avatar May 25 '23 05:05 syehoonkim

I really need my nw.js app and I removed node_modules ! I'm stupid.

oallouch avatar May 28 '23 22:05 oallouch

Supported nw-builder v4. Please note that the implementation will change accordingly. (nw-builder v4 is not backward compatible with v3.)

Change package.json

  {
    "dependencies": {
-     "nw-react-scripts": "5.0.3",
+     "nw-react-scripts": "5.1.0",
    },
-   "nwBuilder": {
-     "//": "https://github.com/nwjs-community/nw-builder",
-     "platforms": [
-       "osx64",
-       "win32",
-       "win64"
-     ],
-     "version": "latest",
-     "flavor": "normal",
-     "buildDir": "./build",
-     "cacheDir": "./cache",
-     "macIcns": "./src/logo.icns"
-   }
+   "nwbuilds": {
+     "//": "https://nwutils.io/nw-builder/",
+     "platforms": [
+       "osx64",
+       "win32",
+       "win64"
+     ],
+     "version": "latest",
+     "flavor": "normal",
+     "outDir": "./out",
+     "cacheDir": "./cache",
+     "app": {
+       "name": "my-app",
+       "icon": "./src/logo.icns"
+     }
+   }
  }

Update package

npm install

Add .gitignore

+ out

nw-builder v3 https://github.com/nwutils/nw-builder/blob/v3.8.6/README.md

nw-builder v4 https://nwutils.io/nw-builder/migrate-v3-v4.html

nw-builder v4 wrapper (support platforms key) https://github.com/naviapps/nw-builder-platforms

naviapis avatar May 31 '23 06:05 naviapis