slashinfty / nincid

Cross platform Electron-based controller input display for Nintendo devices
https://slashinfty.github.io/nincid/
MIT License
0 stars 1 forks source link

MacBook Air M1 Error #18

Open jB0ne90 opened 2 years ago

jB0ne90 commented 2 years ago

Hello!

I'm following the cloning instructions from the README file (I tried the direct Mac release but only shows a blank screen once you hit 'Load Input Display'). When I run the 'yarn install' command I get the following error:

error /Users/jay/Documents/nincid/node_modules/electron: Command failed.
Exit code: 1
Command: node install.js
Arguments: 
Directory: /Users/jay/Documents/nincid/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/jay/Documents/nincid/node_modules/got/source/as-stream.js:35:24)
    at EventEmitter.emit (node:events:527:28)
    at module.exports (/Users/jay/Documents/nincid/node_modules/got/source/get-response.js:22:10)
    at ClientRequest.handleResponse (/Users/jay/Documents/nincid/node_modules/got/source/request-as-event-emitter.js:155:5)
    at Object.onceWrapper (node:events:642:26)
    at ClientRequest.emit (node:events:539:35)
    at ClientRequest.origin.emit (/Users/jay/Documents/nincid/node_modules/@szmarczak/http-timer/source/index.js:37:11)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:631:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
    at TLSSocket.socketOnData (node:_http_client:494:22)

Any ideas? πŸ˜…

Thank you!

jB0ne90 commented 2 years ago

Update:

So I changed the electron dependency to version 11.0.1 in the package.json, which now allows me to install and run nincid - but I can't see my usb in the select port drop down menu? I've pasted the console log below:

jay@Jays-MacBook-Air nincid % yarn start
yarn run v1.22.18
$ electron .
(node:16787) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
(node:16790) Electron: Loading non-context-aware native module in renderer: '/Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
(node:16790) Electron: Loading non-context-aware native module in renderer: '/Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.
✨  Done in 21.99s.
jay@Jays-MacBook-Air nincid % rm yarn.lock && rm -rf node_modules/serialport node_modules/@serialport
jay@Jays-MacBook-Air nincid % yarn install

yarn install v1.22.18
info No lockfile found.
[1/4] πŸ”  Resolving packages...
warning electron-builder > dmg-builder > dmg-license@1.0.11: Disk image license agreements are deprecated by Apple and will probably be removed in a future macOS release. Discussion at: https://github.com/argv-minus-one/dmg-license/issues/11
warning electron-rebuild > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning electron-rebuild > node-gyp > request > 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.
warning electron-rebuild > node-gyp > request > har-validator@5.1.5: this library is no longer supported
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ”¨  Building fresh packages...
success Saved lockfile.
✨  Done in 19.84s.
jay@Jays-MacBook-Air nincid % ./node_modules/.bin/electron-rebuild 
βœ” Rebuild Complete
jay@Jays-MacBook-Air nincid % yarn start
yarn run v1.22.18
$ electron .
(node:17309) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
^[[1;2D(node:17309) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
✨  Done in 79.24s.
jay@Jays-MacBook-Air nincid %    
slashinfty commented 2 years ago

I've not been able to ever test on a Mac due to access (though there is some basic updating I need to do). If you're doing it from source, maybe try uncommenting this line and see if there are any more details in the console there.

jB0ne90 commented 2 years ago

Okee dokee! So I've just done that and this is what the consoles saying:

Unable to load preload script: /Users/jay/Documents/nincid/main/preload.js

and

Error: The module '/Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 85. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1203)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5)
    at Module.load (internal/modules/cjs/loader.js:992)
    at Module._load (internal/modules/cjs/loader.js:885)
    at Function.f._load (electron/js2c/asar_bundle.js:5)
    at Module.require (internal/modules/cjs/loader.js:1032)
    at require (internal/modules/cjs/helpers.js:72)
    at bindings (/Users/jay/Documents/nincid/node_modules/bindings/bindings.js:112)
    at Object.<anonymous> (/Users/jay/Documents/nincid/node_modules/@serialport/bindings/lib/darwin.js:2)
(anonymous) @ electron/js2c/renderer_init.js:91
/Users/jay/Documents/nincid/node_modules/bindings/bindings.js:121 

Uncaught Error: The module '/Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 93. This version of Node.js requires
NODE_MODULE_VERSION 85. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1203)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5)
    at Module.load (internal/modules/cjs/loader.js:992)
    at Module._load (internal/modules/cjs/loader.js:885)
    at Function.f._load (electron/js2c/asar_bundle.js:5)
    at Module.require (internal/modules/cjs/loader.js:1032)
    at require (internal/modules/cjs/helpers.js:72)
    at bindings (/Users/jay/Documents/nincid/node_modules/bindings/bindings.js:112)
    at Object.<anonymous> (/Users/jay/Documents/nincid/node_modules/@serialport/bindings/lib/darwin.js:2)
slashinfty commented 2 years ago

Part of the cloning instructions address this:

# If there is an error about bindings and node versions after starting
rm yarn.lock && rm -rf node_modules/serialport node_modules/@serialport
yarn install
./node_modules/.bin/electron-rebuild # For Linux/Mac
jB0ne90 commented 2 years ago

Done that, but still no joy in the drop down. Here's the new errors from the apps' console:

electron/js2c/renderer_init.js:91 Error: 

dlopen(/Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node, 1): no suitable image found.  Did find:

    /Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node: mach-o, but wrong architecture

    /Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node: mach-o, but wrong architecture
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1203)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5)
    at Module.load (internal/modules/cjs/loader.js:992)
    at Module._load (internal/modules/cjs/loader.js:885)
    at Function.f._load (electron/js2c/asar_bundle.js:5)
    at Module.require (internal/modules/cjs/loader.js:1032)
    at require (internal/modules/cjs/helpers.js:72)
    at bindings (/Users/jay/Documents/nincid/node_modules/bindings/bindings.js:112)
    at Object.<anonymous> (/Users/jay/Documents/nincid/node_modules/@serialport/bindings/lib/darwin.js:2)

(anonymous) @ electron/js2c/renderer_init.js:91

/Users/jay/Documents/nincid/node_modules/bindings/bindings.js:121 Uncaught Error: dlopen(/Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node, 1): no suitable image found.  Did find:

    /Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node: mach-o, but wrong architecture

    /Users/jay/Documents/nincid/node_modules/@serialport/bindings/build/Release/bindings.node: mach-o, but wrong architecture
    at process.func [as dlopen] (electron/js2c/asar_bundle.js:5)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1203)
    at Object.func [as .node] (electron/js2c/asar_bundle.js:5)
    at Module.load (internal/modules/cjs/loader.js:992)
    at Module._load (internal/modules/cjs/loader.js:885)
    at Function.f._load (electron/js2c/asar_bundle.js:5)
    at Module.require (internal/modules/cjs/loader.js:1032)
    at require (internal/modules/cjs/helpers.js:72)
    at bindings (/Users/jay/Documents/nincid/node_modules/bindings/bindings.js:112)
    at Object.<anonymous> (/Users/jay/Documents/nincid/node_modules/@serialport/bindings/lib/darwin.js:2)

Here is some errors/warnings from the terminal:

jay@Jays-MacBook-Air nincid % rm yarn.lock && rm -rf node_modules/serialport node_modules/@serialport
jay@Jays-MacBook-Air nincid % yarn install
yarn install v1.22.18
info No lockfile found.
[1/4] πŸ”  Resolving packages...
warning electron-builder > dmg-builder > dmg-license@1.0.11: Disk image license agreements are deprecated by Apple and will probably be removed in a future macOS release. Discussion at: https://github.com/argv-minus-one/dmg-license/issues/11
warning electron-rebuild > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning electron-rebuild > node-gyp > request > har-validator@5.1.5: this library is no longer supported
warning electron-rebuild > node-gyp > request > 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.
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ”¨  Building fresh packages...
success Saved lockfile.
✨  Done in 8.99s.
jay@Jays-MacBook-Air nincid % ./node_modules/.bin/electron-rebuild
βœ” Rebuild Complete
jay@Jays-MacBook-Air nincid % yarn start
yarn run v1.22.18
$ electron .
(node:21809) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information