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

[pulsar-next] Ensure ppm rebuild works with latest Electron #143

Open
savetheclocktower opened this issue Sep 24, 2024 · 0 comments
Open

Comments

@savetheclocktower
Copy link
Contributor

savetheclocktower commented Sep 24, 2024

On ppm-next, I tried to install x-terminal-reloaded to get a sense of where we are with native modules:

Code/Atom/x-terminal-reloaded (main) ➜  ppm-next install x-terminal-reloaded
Installing x-terminal-reloaded to /Users/andrew/.pulsar-next/packages ✗

> [email protected] install /private/var/folders/lq/bjw58qh536q2wt24cfcqfy_80000gn/T/apm-install-dir-2024823-88215-gztlu8.dcdjs/node_modules/x-terminal-reloaded/node_modules/node-pty-prebuilt-multiarch
> prebuild-install || node scripts/install.js

undefined
  CXX(target) Release/obj.target/pty/src/unix/pty.o

npm WARN deprecated [email protected]: This package is now deprecated. Move to @xterm/xterm instead.
npm WARN deprecated [email protected]: This package is now deprecated. Move to @xterm/addon-fit instead.
npm WARN deprecated [email protected]: This package is now deprecated. Move to @xterm/addon-web-links instead.
npm WARN deprecated [email protected]: This package is now deprecated. Move to @xterm/addon-webgl instead.
npm WARN deprecated [email protected]: This package is now deprecated. Move to @xterm/addon-ligatures instead.
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: This package is no longer supported.
npm WARN deprecated [email protected]: This package is no longer supported.
/private/var/folders/lq/bjw58qh536q2wt24cfcqfy_80000gn/T/apm-install-dir-2024823-88215-gztlu8.dcdjs/node_modules/x-terminal-reloaded/node_modules/node-abi/index.js:36
  throw new Error('Could not detect abi for version ' + target + ' and runtime ' + runtime + '.  Updating "node-abi" might help solve this issue if it is a new release of ' + runtime)
  ^

Error: Could not detect abi for version 30.0.9 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
    at getAbi (/private/var/folders/lq/bjw58qh536q2wt24cfcqfy_80000gn/T/apm-install-dir-2024823-88215-gztlu8.dcdjs/node_modules/x-terminal-reloaded/node_modules/node-abi/index.js:36:9)
    at module.exports (/private/var/folders/lq/bjw58qh536q2wt24cfcqfy_80000gn/T/apm-install-dir-2024823-88215-gztlu8.dcdjs/node_modules/x-terminal-reloaded/node_modules/prebuild-install/rc.js:52:57)
    at Object.<anonymous> (/private/var/folders/lq/bjw58qh536q2wt24cfcqfy_80000gn/T/apm-install-dir-2024823-88215-gztlu8.dcdjs/node_modules/x-terminal-reloaded/node_modules/prebuild-install/bin.js:8:25)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Function.Module._load (node:internal/modules/cjs/loader:828:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47
In file included from ../src/unix/pty.cc:20:
In file included from ../../nan/nan.h:62:
/Users/andrew/.pulsar-next/.node-gyp/Library/Caches/node-gyp/30.0.9/include/node/node.h:27:2: error: "It looks like you are building this native module without using the right config.gypi.  This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=9.0.0) if you're building modules directly."
   27 | #error "It looks like you are building this native module without using the right config.gypi.  This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=9.0.0) if you're building modules directly."
      |  ^
1 error generated.
make: *** [Release/obj.target/pty/src/unix/pty.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/Users/andrew/Code/JavaScript/pulsar-latest-electron/dist/mac-arm64/PulsarNext.app/Contents/Resources/app/ppm/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
gyp ERR! System Darwin 23.6.0
gyp ERR! command "/Users/andrew/Code/JavaScript/pulsar-latest-electron/dist/mac-arm64/PulsarNext.app/Contents/Resources/app/ppm/bin/node" "/Users/andrew/Code/JavaScript/pulsar-latest-electron/dist/mac-arm64/PulsarNext.app/Contents/Resources/app/ppm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/lq/bjw58qh536q2wt24cfcqfy_80000gn/T/apm-install-dir-2024823-88215-gztlu8.dcdjs/node_modules/x-terminal-reloaded/node_modules/node-pty-prebuilt-multiarch
gyp ERR! node -v v16.0.0
gyp ERR! node-gyp -v v9.4.0
gyp ERR! not ok
npm WARN notsup Unsupported engine for [email protected]: wanted: {"node":"^14.17.0 || ^16.13.0 || >=18.0.0"} (current: {"node":"16.0.0","npm":"6.14.19-pulsar1-1"})
npm WARN notsup Not compatible with your version of node/npm: [email protected]
npm WARN enoent ENOENT: no such file or directory, open '/private/var/folders/lq/bjw58qh536q2wt24cfcqfy_80000gn/T/apm-install-dir-2024823-88215-gztlu8.dcdjs/package.json'
npm WARN apm-install-dir-2024823-88215-gztlu8.dcdjs No description
npm WARN apm-install-dir-2024823-88215-gztlu8.dcdjs No repository field.
npm WARN apm-install-dir-2024823-88215-gztlu8.dcdjs No README data
npm WARN apm-install-dir-2024823-88215-gztlu8.dcdjs No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `prebuild-install || node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/andrew/.pulsar-next/.apm/_logs/2024-09-24T02_19_42_266Z-debug.log

Can't entirely work out what's going on here, but I can guess at a couple of issues:

  • The bundled Node version with ppm-next — 16.0.0 — might be too old to go with the Node version of 20.11.1 that goes with Electron 30.0.9.
  • One of ppm-next's dependencies might need to be updated before ppm-next understands what it means to build something for Electron 30.0.9.
  • It could be as simple as this line from the log — Error: [email protected] install: \prebuild-install || node scripts/install.js`` — which I wasn't able to dig more deeply into.

I was only able to get it working by checking out the x-terminal-reloaded repo locally, running npm install (I don't think ppm install on its own worked, but I could be remembering wrong), then running npx electron-rebuild -v 30.0.9.

@savetheclocktower savetheclocktower converted this from a draft issue Sep 24, 2024
@savetheclocktower savetheclocktower changed the title [ppm] Ensure ppm rebuild works with latest Electron [pulsar-next] Ensure ppm rebuild works with latest Electron Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

1 participant