Giter Site home page Giter Site logo

Cannot install macOS m1 cpu about nightmare HOT 9 OPEN

wnghdcjfe avatar wnghdcjfe commented on June 6, 2024 8
Cannot install macOS m1 cpu

from nightmare.

Comments (9)

viperet avatar viperet commented on June 6, 2024 15

Just found a solution - you have to install it using npm install --arch=x64, and it runs perfectly using Rosetta 2.

from nightmare.

carter-dewey-wapo avatar carter-dewey-wapo commented on June 6, 2024 3

Would love a fix to this problem.

from nightmare.

JRJurman avatar JRJurman commented on June 6, 2024 2

Was able to solve this by using npm's overrides (described here). If you use "electron": "^11.0.0",, that is compatible with M1, and works with Nightmare's existing API (as far as I can tell).

  "devDependencies": {
    "electron": "^11.0.0",
    "nightmare": "^3.0.2"
  },
  "overrides": {
    "nightmare": {
      "electron": "$electron"
    }
  }

from nightmare.

vsinha avatar vsinha commented on June 6, 2024 1

Encountered the same, I think the old version of Electron being used doesn't (didn't) have arm64 builds. Updating to a new version of electron should work

~ $ npm --version
7.20.0

~ $ npm list electron
viraj@ /Users/viraj
└── [email protected]

~ $ uname -a
Darwin Virajs-MacBook-Pro.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:31 PDT 2021; root:xnu-7195.121.3~9/RELEASE_ARM64_T8101 arm64

~ $ npm install nightmare
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: not actively maintained; find alternatives
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /Users/viraj/node_modules/nightmare/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c node install.js
Downloading electron-v2.0.18-darwin-arm64.zip
npm ERR! Error: GET https://github.com/electron/electron/releases/download/v2.0.18/electron-v2.0.18-darwin-arm64.zip returned 404
npm ERR! /Users/viraj/node_modules/nightmare/node_modules/electron/install.js:54
npm ERR!   throw err
npm ERR!   ^
npm ERR!
npm ERR! Error: Failed to find Electron v2.0.18 for darwin-arm64 at https://github.com/electron/electron/releases/download/v2.0.18/electron-v2.0.18-darwin-arm64.zip
npm ERR!     at Request.<anonymous> (/Users/viraj/node_modules/nugget/index.js:169:61)
npm ERR!     at Request.emit (node:events:369:20)
npm ERR!     at Request.onRequestResponse (/Users/viraj/node_modules/request/request.js:1059:10)
npm ERR!     at ClientRequest.emit (node:events:369:20)
npm ERR!     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:646:27)
npm ERR!     at HTTPParser.parserOnHeadersComplete (node:_http_common:129:17)
npm ERR!     at TLSSocket.socketOnData (node:_http_client:512:22)
npm ERR!     at TLSSocket.emit (node:events:369:20)
npm ERR!     at addChunk (node:internal/streams/readable:313:12)
npm ERR!     at readableAddChunk (node:internal/streams/readable:288:9)

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/viraj/.npm/_logs/2021-07-21T02_30_07_552Z-debug.log

from nightmare.

betogzo avatar betogzo commented on June 6, 2024 1

frustrating... but trying to solve this issue i found "puppeteer" and it works just fine. rip nightmare

from nightmare.

wjpurdum avatar wjpurdum commented on June 6, 2024

Updating to the latest version of nightmare doesn't work. It still uses a version of electron that is too old for M1.

from nightmare.

rayhomie avatar rayhomie commented on June 6, 2024

Can this problem be solved ?😒

from nightmare.

aq1018 avatar aq1018 commented on June 6, 2024

I think a proper solution is to bump the electron version to the one that supports m1 cpu? Electron 2.0.18 was released 4 years ago and the latest version is 21.0.1

from nightmare.

wilfredjonathanjames avatar wilfredjonathanjames commented on June 6, 2024

This is a pretty big deal with a seemingly simple fix. Considering it hasn't been addressed, does this mean nightmare is a dead project?

from nightmare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.