pulsar-edit / ppm

Pulsar Package Manager
MIT License
35 stars 14 forks source link

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

Open savetheclocktower opened 2 months ago

savetheclocktower commented 2 months ago

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 ✗ > node-pty-prebuilt-multiarch@0.10.0 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 xterm@5.2.1: This package is now deprecated. Move to @xterm/xterm instead. npm WARN deprecated xterm-addon-fit@0.7.0: This package is now deprecated. Move to @xterm/addon-fit instead. npm WARN deprecated xterm-addon-web-links@0.8.0: This package is now deprecated. Move to @xterm/addon-web-links instead. npm WARN deprecated xterm-addon-webgl@0.15.0: This package is now deprecated. Move to @xterm/addon-webgl instead. npm WARN deprecated xterm-addon-ligatures@0.6.0: This package is now deprecated. Move to @xterm/addon-ligatures instead. npm WARN deprecated npmlog@4.1.2: This package is no longer supported. npm WARN deprecated gauge@2.7.4: This package is no longer supported. npm WARN deprecated are-we-there-yet@1.1.7: 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. (/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. (/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 which@3.0.1: 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: which@3.0.1 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! node-pty-prebuilt-multiarch@0.10.0 install: `prebuild-install || node scripts/install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-pty-prebuilt-multiarch@0.10.0 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:

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.