简体   繁体   中英

npm fails to install depencies

I'm trying to use this from GitHub and I have to install the dependencies for it. When I run "npm install" it gives me the following error.

 Last login: Sat Feb 19 20:41:00 on ttys000 jakob@Jakobs-MacBook-Air ~ % cd Desktop/unredacter jakob@Jakobs-MacBook-Air unredacter % npm install npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the registry. npm WARN old lockfile npm WARN old lockfile This is a one-time fix-up, please be patient... npm WARN old lockfile npm WARN deprecated debug@4.2.0: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm ERR. code 1 npm ERR: path /Users/jakob/Desktop/unredacter/node_modules/electron npm ERR: command failed npm ERR. command sh -c node install.js npm ERR. HTTPError. Response code 404 (Not Found) for https.//github.com/electron/electron/releases/download/v9.4.4/electron-v9:4:4-darwin-arm64.zip npm ERR: at EventEmitter:<anonymous> (/Users/jakob/Desktop/unredacter/node_modules/got/source/as-stream:js.35.24) npm ERR: at EventEmitter:emit (node.events.526:28) npm ERR: at module.exports (/Users/jakob/Desktop/unredacter/node_modules/got/source/get-response:js:22:10) npm ERR. at ClientRequest:handleResponse (/Users/jakob/Desktop/unredacter/node_modules/got/source/request-as-event-emitter:js:155.5) npm ERR. at Object.onceWrapper (node:events:646.26) npm ERR: at ClientRequest:emit (node:events.538:35) npm ERR: at ClientRequest:origin.emit (/Users/jakob/Desktop/unredacter/node_modules/@szmarczak/http-timer/source/index:js:37:11) npm ERR: at HTTPParser.parserOnIncomingClient [as onIncoming] (node._http_client:618:27) npm ERR! at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17) npm ERR! at TLSSocket.socketOnData (node:_http_client:482:22) npm ERR! A complete log of this run can be found in: npm ERR! /Users/jakob/.npm/_logs/2022-02-19T19_41_32_484Z-debug-0.log jakob@Jakobs-MacBook-Air unredacter %

So it fails to download Electron. I'm using an Apple M1. Makes sense that it doesn't install since since it tries to install Electron v.9.4.4 which didn't release for ARM. How can I tell it to install a newer Electron version and proceed with the other dependencies?

If you have cloned the repo you can run

npm install electron@latest --save-dev

this will update the package in the dev-dependencies property of the package.json which you can check to verify it has been updated to the latest version

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM