Response code 404 (Not Found) for https://github.com/electron/electron/releases/download/v9.4.4/electron-v9.4.4-darwin-arm64.zip
Asked Answered
A

2

14

I'm trying to install node modules for react native project in M1 macbook pro. While trying to run npm install or yarn install I'm having this error.

error /Users/akash/Documents/Projects/business-hub/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: /Users/akash/Documents/Projects/business-hub/node_modules/electron
Output:
HTTPError: Response code 404 (Not Found) for https://github.com/electron/electron/releases/download/v9.4.4/electron-v9.4.4-darwin-arm64.zip
    at EventEmitter.<anonymous> (/Users/akash/Documents/Projects/business-hub/node_modules/got/source/as-stream.js:35:24)
    at EventEmitter.emit (node:events:369:20)
    at module.exports (/Users/akash/Documents/Projects/business-hub/node_modules/got/source/get-response.js:22:10)
    at ClientRequest.handleResponse (/Users/akash/Documents/Projects/business-hub/node_modules/got/source/request-as-event-emitter.js:155:5)
    at Object.onceWrapper (node:events:476:26)
    at ClientRequest.emit (node:events:381:22)
    at ClientRequest.origin.emit (/Users/akash/Documents/Projects/business-hub/node_modules/@szmarczak/http-timer/source/index.js:37:11)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:636:27)

I'm unable to find which of my packages are using electron for that I can not upgrade the version of electron.

Anticholinergic answered 31/3, 2021 at 9:8 Comment(2)
github.com/electron/electron/releases - shows releases only as far back as 11.4 - ?Hershelhershell
Yes, as far I have found, react debugging tools require electron version 11.0.1 in m1 macs. I think I have found the ans. I will answer the question shortly.Anticholinergic
A
30

React debugging tools require electron version 11.0.1 in m1 macs. As described here
If using Yarn, you can add a resolutions entry to package.json specifying which version to install:

"resolutions": {
  "electron": "^11.0.1"
}

and then yarn install.

Anticholinergic answered 31/3, 2021 at 9:24 Comment(0)
A
0

The correct solution is by upgrading electron. But, if for some reason you cannot do it (for example you need to build an old application on x86_64/i386 architecture that cannot be upgraded), you can run the Terminal using Rosetta:

1 - Locate Terminal on Finder (generally under Applications/Utilities)

2 - Right-click the Terminal icon and select Get Info.

3 - Check the Open with Rosetta option

After that, you can open the terminal and use the arch command to check if it is running in the correct architecture.

Then just run npm install.

Aksum answered 15/2, 2023 at 21:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.