Automattic / simplenote-electron

Simplenote for Web, Windows, and Linux
https://app.simplenote.com
GNU General Public License v2.0
4.69k stars 553 forks source link

Dependency errors when running `npm install` on M1 Mac mini #3178

Closed Chett23 closed 1 month ago

Chett23 commented 5 months ago

Expected

As per the README i should be able to git clone ... then run npm install then npm run dev to start the dev build and start developing.

Observed

However, npm install fails and is unable to full install the dependencies. If i ignore this and run npm run dev i get the following error.

> simplenote@2.21.0 dev
> make dev

npm ERR! could not determine executable to run

This error when running npm run dev persists throughout this process.

Reproduced

This seems to be an issue when using an M1 Mac

run npm install, which fails when attempting to install the Spectron dependancy due to the electron-chromedriver@9.0.0 as there is no version compatible with M1 devices GotError [HTTPError]: Response code 404 (Not Found) for https://github.com/electron/electron/releases/download/v9.0.0/chromedriver-v9.0.0-darwin-arm64.zip

i was able to get past this by upgrading the Spectron version to ^11.0.0 however, after that I ran into errors requiring as I dont have python2.7 added to path,

npm ERR! gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb `which` failed Error: not found: python2

as well as a python 3.12 error

npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb `which` succeeded python /Users/chesterhansen/.pyenv/shims/python
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: /Users/chesterhansen/.pyenv/shims/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack   File "<string>", line 1
npm ERR! gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
npm ERR! gyp ERR! stack 
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:419:12)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:512:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! gyp ERR! stack     at Socket.<anonymous> (node:internal/child_process:456:11)
npm ERR! gyp ERR! stack     at Socket.emit (node:events:512:28)
npm ERR! gyp ERR! stack     at Pipe.<anonymous> (node:net:332:12)

Where did you see the bug

I am wanting to fix a Bug with text wrap in the current release, however, cannot get the dev build up and running to start development.

Chett23 commented 4 months ago

I was unable to get the app to launch while using the M1 Mac mini, however, I tried using my laptop running Zorin 17 I was able to launch when using Node v12.14.1 and 14.21.3. However, it seems that the account creation of v2.7.0 also is not working. When I enter an email and password i get the error 'Could not create account. Please try again.'. Trying again does not work and the console prints an error to the post url https://auth.simperium.com/1/history-analyst-dad/create/

Seems to be related to #2853

codebykat commented 1 month ago

Should be resolved by #3183