vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.24k stars 3.51k forks source link

Build error: .../node_modules/leveldown: Command failed. #7573

Closed oaklandgit closed 10 months ago

oaklandgit commented 11 months ago

Issue

I'd like to contribute to this project, but I'm stuck on this error when building with yarn:

yarn
yarn install v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
[1/6] ⠈ electron
[6/6] ⠈ playwright
[3/6] ⠈ leveldown
[4/6] ⠈ electron-mksnapshot
error /Users/laz/Hyper_Repo/hyper/node_modules/leveldown: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments:
Directory: /Users/laz/Hyper_Repo/hyper/node_modules/leveldown
Output:
node:events:492
      throw er; // Unhandled 'error' event
      ^

Error: spawn node-gyp ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn node-gyp',
  path: 'node-gyp',
  spawnargs: [ 'rebuild' ]

Thank you and please advise.

ben-wfp commented 11 months ago

Hello @oaklandgit. I think this is related to upgrading to the latest version of macOS 14. Doing this solved it for me: npm i -g node-gyp@latest

oaklandgit commented 10 months ago

Thank you @ben-wfp . That did the trick!

oaklandgit commented 10 months ago

(closing)