naviapps / create-nw-react-app

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

Can't create a project #63

Open tuliofh01 opened 1 year ago

tuliofh01 commented 1 year ago

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

Username4212 commented 1 year ago

Same for me

patrick-patel commented 1 year ago

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

syehoonkim commented 1 year ago

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?

oallouch commented 1 year ago

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

naviapis commented 1 year ago

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