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

dev: yarn run dev errors with stock Python 3.12 #8027

Open
2 tasks done
corneliusroemer opened this issue Aug 24, 2024 · 3 comments
Open
2 tasks done

dev: yarn run dev errors with stock Python 3.12 #8027

corneliusroemer opened this issue Aug 24, 2024 · 3 comments

Comments

@corneliusroemer
Copy link

corneliusroemer commented Aug 24, 2024

  • I am on the latest Hyper.app version
  • I have searched the issues of this repo and believe that this is not a duplicate

I've cloned the canary branch (default).

  • OS version and name: Darwin m2-mini 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:16:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8112 arm64
  • Hyper.app version: canary

Issue

I'm trying to get hyper working locally using dev setup. I followed the README.md:

  • Install yarn (v1.22.22)
  • Run yarn
  • Run yarn run dev

However I get an error:

$ yarn run dev
$ electron-rebuild -f -o node-pty -m target
⠴ Building module: node-pty, Completed: 0Traceback (most recent call last):
  File "/Users/corneliusroemer/code/hyper/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
    import gyp  # noqa: E402
    ^^^^^^^^^^
  File "/Users/corneliusroemer/code/hyper/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
    import gyp.input
  File "/Users/corneliusroemer/code/hyper/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
    from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
Error: `gyp` failed with exit code: 1
    at ChildProcess.onCpExit (/Users/corneliusroemer/code/hyper/node_modules/node-gyp/lib/configure.js:325:16)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)

✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild '/Users/corneliusroemer/code/hyper/target/node_modules/node-pty'

Error: node-gyp failed to rebuild '/Users/corneliusroemer/code/hyper/target/node_modules/node-pty'
    at ChildProcess.<anonymous> (/Users/corneliusroemer/code/hyper/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js:118:24)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

It looks like the README is not up to date regarding dev setup on macos.

@corneliusroemer

This comment was marked as resolved.

@corneliusroemer
Copy link
Author

I got further by:

  • Pinning node to v20 (instead of latest)
  • Using classic yarn

But thing still error our:

yarn run v1.22.22
$ electron-rebuild -f -o node-pty -m target
⠴ Building module: node-pty, Completed: 0Traceback (most recent call last):
  File "/Users/corneliusroemer/code/hyper/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
    import gyp  # noqa: E402
    ^^^^^^^^^^
  File "/Users/corneliusroemer/code/hyper/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
    import gyp.input
  File "/Users/corneliusroemer/code/hyper/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
    from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
Error: `gyp` failed with exit code: 1
    at ChildProcess.onCpExit (/Users/corneliusroemer/code/hyper/node_modules/node-gyp/lib/configure.js:325:16)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)

✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild '/Users/corneliusroemer/code/hyper/target/node_modules/node-pty'

Error: node-gyp failed to rebuild '/Users/corneliusroemer/code/hyper/target/node_modules/node-pty'
    at ChildProcess.<anonymous> (/Users/corneliusroemer/code/hyper/node_modules/@electron/rebuild/lib/module-type/node-gyp/node-gyp.js:118:24)
    at ChildProcess.emit (node:events:519:28)
    at ChildProcess._handle.onexit (node:internal/child_process:294:12)
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

@corneliusroemer
Copy link
Author

Current electron-rebuild is not compatible with Python 3.12, see electron/rebuild#1116

You can fix by installing setuptools manually in your Python installation.

pip install setuptools

@corneliusroemer corneliusroemer changed the title dev: yarn run dev throws error /bin/sh: concurrently: command not found dev: yarn run dev errors with stock Python 3.12 Aug 25, 2024
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