vercel / vercel/hyper

dev: `yarn run dev` errors with stock Python 3.12

Open
#8,027 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
44.7k
Forks
3.6k
Avg merge
21m
Merged PRs (30d)
1

Description

  • 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with README.md and reproduce the documented yarn run dev flow using stock Python 3.12 on macOS. Inspect the dependency versions involved in electron-rebuild, node-gyp, and node-pty; done means the setup works with Python 3.12 or README.md clearly documents the supported requirements and workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, node.js, python
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.