Steveorevo / node-red-contrib-nbrowser

Provides a virtual web browser (a.k.a. "headless browser") appearing as a node.
34 stars 13 forks source link

Unable to `npm install` on M1 Macbook Pro (MacOS 11.4) #32

Open vsinha opened 3 years ago

vsinha commented 3 years ago
~ $ npm --version
7.20.0

~ $ npm list electron
viraj@ /Users/viraj
└── electron@13.1.7

~ $ 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 node-red-contrib-nbrowser node-red-contrib-credentials
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated deep-defaults@1.0.5: not actively maintained; find alternatives
npm WARN deprecated uuid@3.4.0: 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 request@2.88.2: 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-v1.8.8-darwin-arm64.zip
npm ERR! Error: GET https://github.com/electron/electron/releases/download/v1.8.8/electron-v1.8.8-darwin-arm64.zip returned 404
npm ERR! /Users/viraj/node_modules/nightmare/node_modules/electron/install.js:47
npm ERR!   throw err
npm ERR!   ^
npm ERR!
npm ERR! Error: Failed to find Electron v1.8.8 for darwin-arm64 at https://github.com/electron/electron/releases/download/v1.8.8/electron-v1.8.8-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-21T01_43_45_111Z-debug.log
vsinha commented 3 years ago

This is probably fine to close for now, it looks like the issue is with nightmare (and as the name might suggest, nightmare's test suite is thoroughly broken for newer versions of electron. Updating will be a bit of an nightmare

Not sure if there are other libs which could be used in lieu of nightmare in nbrowser