Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot resolve https://github.com/electron/electron/releases/download/v27.0.0+wvcus/electron-v27.0.0+wvcus-win32-x64.zip: status code 404 #181

Open
iamharshitpandeyy opened this issue Mar 26, 2024 · 6 comments

Comments

@iamharshitpandeyy
Copy link

cannot resolve https://github.com/electron/electron/releases/download/v27.0.0+wvcus/electron-v27.0.0+wvcus-win32-x64.zip: status code 404

@khwaaj
Copy link
Collaborator

khwaaj commented Mar 26, 2024

The URL is wrong, this tries to download an ECS release from the official Electron repo. When you are packaging with something like electron-builder you need to set at mirror to get the correct URL. Check out this FAQ: https://github.com/castlabs/electron-releases/wiki/FAQ#how-can-i-use-electron-builder-with-ecs

@iamharshitpandeyy
Copy link
Author

So we have to add it to our package. json NodeJS, right ? Do we have to add something after the "v" in the string "https://github.com/castlabs/electron-releases/releases/download/v" like version ?

@khwaaj
Copy link
Collaborator

khwaaj commented Mar 26, 2024

Yeah, you need to add It to your package.json, more details are available in the electron-builder documentation if you need it. You should not have to add extra after download/v, this is just the first part of the URL that is used to assemble the final one so the version will be attached automatically.

@iamharshitpandeyy
Copy link
Author

iamharshitpandeyy commented Mar 27, 2024

{
        "name": <name>,
        "version": "0.1.1",
        "private": true,
        "main": "public/electron.js",
        "homepage": "./",
        "dependencies": {
         //dependency
        },
        "scripts": {
          "dev": "concurrently -k \"cross-env BROWSER=none npm start\" \"npm:electron:serve\"",
          "dev-teacher": "concurrently -k \"cross-env BROWSER=none npm run react:teacher\" \"npm:electron:serve:teacher\"",
          "dev-student": "concurrently -k \"cross-env BROWSER=none npm run react:student\" \"npm:electron:serve:student\"",
          "electron:serve": "wait-on tcp:3000 && electron .",
          "electron:serve:teacher": "set USER_TYPE=TEACHER&&set PORT=3000&&wait-on tcp:3000 && electron .",
          "electron:serve:student": "set USER_TYPE=STUDENT&&set PORT=4000&&wait-on tcp:4000 && electron .",
          "electron:start": "electron .",
          "electron:build:dev": "npm run build && electron-builder -c.extraMetadata.main=build/electron.js --config electron-builder.dev.yaml",
          "electron:build:prod": "npm run build && electron-builder -c.extraMetadata.main=build/electron.js --config electron-builder.prod.yaml",
          "electron:publish:dev": "electron-builder --config electron-builder.dev.yaml --win -p always",
          "electron:publish:prod": "electron-builder --config electron-builder.prod.yaml --win -p always",
          "react:teacher": "set PORT=3000 && react-scripts start --max-old-space-size=16384",
          "react:student": "set PORT=4000 && react-scripts start --max-old-space-size=16384",
          "start": "react-scripts start --max-old-space-size=16384",
          "build": "react-scripts build --max-old-space-size=16384",
          "test": "react-scripts test",
          "eject": "react-scripts eject"
        },
        "eslintConfig": {
          "extends": [
            "react-app",
            "react-app/jest"
          ]
        },
        "browserslist": {
          "production": [
            "defaults",
            "not ie 11"
          ],
          "development": [
            "last 1 chrome version",
            "last 1 firefox version",
            "last 1 safari version"
          ]
        },
        "devDependencies": {
          "electron": "github:castlabs/electron-releases#v27.0.0+wvcus",
          "electron-builder": "^24.9.1",
          "tailwindcss": "^3.3.3",
          "webpack-node-externals": "^3.0.0"
        },
        "build": {
        "electronDownload": {
          "mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
        }
      }
}

Still It's was not building, showing same issue

@khwaaj
Copy link
Collaborator

khwaaj commented Mar 27, 2024

That should work in general, maybe you have some conflicting state or configuration?

For example this package.json from a quick start project works fine:

{
  "name": "electron-quick-start",
  "version": "1.0.0",
  "description": "A minimal Electron application",
  "main": "main.js",
  "scripts": {
    "start": "electron .",
    "dist": "electron-builder"
  },
  "repository": "https://github.com/electron/electron-quick-start",
  "keywords": [
    "Electron",
    "quick",
    "start",
    "tutorial",
    "demo"
  ],
  "author": "GitHub",
  "license": "CC0-1.0",
  "devDependencies": {
    "electron": "github:castlabs/electron-releases#v29.1.5+wvcus",
    "electron-builder": "^24.9.1"
  },
  "build": {
    "electronDownload": {
      "mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
    }
  }
}

@John7125
Copy link

@iamharshitpandeyy Brother, I have encountered this problem too, have you solved this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants