Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create electron-app doesn't work on m1 #3092

Closed
quolpr opened this issue Nov 24, 2022 · 1 comment
Closed

create electron-app doesn't work on m1 #3092

quolpr opened this issue Nov 24, 2022 · 1 comment

Comments

@quolpr
Copy link

quolpr commented Nov 24, 2022

Operating system

macOS m1(arm)

Expected behavior

When I use yarn create electron-app --template=webpack-typescript it should work fine

Actual behavior

When I use yarn create electron-app --template=webpack-typescript it fails to install cause it tries to install node-sqlite3 and failes because it tries to use python2, while system hav only python3. Upgrade to latest node-sqlite3 should solve the issue.
Related:

TryGhost/node-sqlite3#1413
TryGhost/node-sqlite3#1413 (comment)

(actually bump to 5.0.3 should solve the issue)

Here is the error:

➜  examples git:(main) ✗ yarn create electron-app --template=webpack-typescript
yarn create v1.22.10
[1/4] 🔍  Resolving packages...
warning create-electron-app > @electron-forge/cli > @electron-forge/core > @electron/rebuild > node-gyp > make-fetch-happen > cacache > @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > [email protected]" has unmet peer dependency "@types/node@*".
warning " > [email protected]" has unmet peer dependency "typescript@>=2.7".
[4/4] 🔨  Building fresh packages...
[-/8] ⠄ waiting...
[-/8] ⠄ waiting...
[7/8] ⠄ fsevents
[6/8] ⠄ sqlite3
error /Users/quolpr/.config/yarn/global/node_modules/sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /Users/quolpr/.config/yarn/global/node_modules/sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | arm64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/Users/quolpr/.config/yarn/global/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-darwin-arm64.tar.gz
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-darwin-arm64.tar.gz
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-darwin-arm64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.2/napi-v3-darwin-arm64.tar.gz 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /opt/homebrew/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack   File "<string>", line 1
gyp ERR! stack     import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (node:child_process:400:12)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at maybeClose (node:internal/child_process:1093:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
gyp ERR! System Darwin 22.1.0
gyp ERR! command "/Users/quolpr/.asdf/installs/nodejs/16.17.0/bin/node" "/Users/quolpr/.config/yarn/global/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/quolpr/.config/yarn/global/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/Users/quolpr/.config/yarn/global/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd /Users/quolpr/.config/yarn/global/node_modules/sqlite3
gyp ERR! node -v v16.17.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/Users/quolpr/.asdf/installs/nodejs/16.17.0/bin/node /Users/quolpr/.config/yarn/global/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/quolpr/.config/yarn/global/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/quolpr/.config/yarn/global/node_modules/sqlite3/lib/binding/napi-v3-darwin-arm64 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/quolpr/.config/yarn/global/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1093:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Darwin 22.1.0
node-pre-gyp ERR! command "/Users/quolpr/.asdf/installs/nodejs/16.17.0/bin/node" "/Users/quolpr/.config/yarn/global/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/quolpr/.config/yarn/global/node_modules/sqlite3
node-pre-gyp ERR! node -v v16.17.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok 
Failed to execute '/Users/quolpr/.asdf/installs/nodejs/16.17.0/bin/node /Users/quolpr/.config/yarn/global/node_modules/node-gyp/bin/node-gyp.js configure --fallback-t

Steps to reproduce

Run yarn create electron-app --template=webpack-typescript on m1

Additional information

Node version is v16.17.0, default python version on macOS is python3

@quolpr
Copy link
Author

quolpr commented Nov 24, 2022

Hmm, but installation through npm works correctly 🤔 Maybe it is only mine local yarn issue

@quolpr quolpr closed this as completed Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant