editly icon indicating copy to clipboard operation
editly copied to clipboard

Cannot npm install on Mac - gl fails

Open MileanCo opened this issue 1 year ago • 3 comments
trafficstars

  • [ x] I have tried with the newest version of editly: npm i -g editly or npm i editly@latest
  • [x ] I have tried ffmpeg newest stable version
  • [ x] I have searched for existing issues

it seems I cannot install the gl dependency. Its trying to build special C++ targets. I have a similar failure to here https://github.com/mifi/editly/issues/249

I'm running mac OS intel, node v20, node-gyp -v 9.4.1, etc.

npm install editly npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated [email protected]: This package is no longer supported. Please use @npmcli/package-json instead. npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs npm warn deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex 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]: Rimraf versions prior to v4 are no longer supported npm warn deprecated [email protected]: Use your platform's native atob() and btoa() methods instead npm warn deprecated @babel/[email protected]: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions 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]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: Use your platform's native DOMException instead npm warn deprecated [email protected]: Use your platform's native performance.now() and performance.timeOrigin. npm warn deprecated [email protected]: Use your platform's native DOMException 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 @wessberg/[email protected]: this package has been renamed to ts-evaluator. Please install ts-evaluator instead npm error code 1 npm error path node_modules/editly/node_modules/gl npm error command failed npm error command sh -c prebuild-install || node-gyp rebuild npm error prebuild-install warn install No prebuilt binaries found (target=20.16.0 runtime=node arch=x64 libc= platform=darwin) npm error gyp info it worked if it ends with ok npm error gyp info using [email protected] npm error gyp info using [email protected] | darwin | x64 npm error gyp info find Python using Python version 3.12.5 found at "/usr/local/opt/[email protected]/bin/python3.12" npm error gyp info spawn /usr/local/opt/[email protected]/bin/python3.12 npm error gyp info spawn args [ npm error gyp info spawn args 'node_modules/editly/node_modules/node-gyp/gyp/gyp_main.py', npm error gyp info spawn args 'binding.gyp', npm error gyp info spawn args '-f', npm error gyp info spawn args 'make', npm error gyp info spawn args '-I', npm error gyp info spawn args 'node_modules/editly/node_modules/gl/build/config.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args 'node_modules/editly/node_modules/node-gyp/addon.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args '/Users/jstenkvi/Library/Caches/node-gyp/20.16.0/include/node/common.gypi', npm error gyp info spawn args '-Dlibrary=shared_library', npm error gyp info spawn args '-Dvisibility=default', npm error gyp info spawn args '-Dnode_root_dir=/Users/jstenkvi/Library/Caches/node-gyp/20.16.0', npm error gyp info spawn args '-Dnode_gyp_dir=node_modules/editly/node_modules/node-gyp', npm error gyp info spawn args '-Dnode_lib_file=/Users/jstenkvi/Library/Caches/node-gyp/20.16.0/<(target_arch)/node.lib', npm error gyp info spawn args '-Dmodule_root_dir=node_modules/editly/node_modules/gl', npm error gyp info spawn args '-Dnode_engine=v8', npm error gyp info spawn args '--depth=.', npm error gyp info spawn args '--no-parallel', npm error gyp info spawn args '--generator-output', npm error gyp info spawn args 'build', npm error gyp info spawn args '-Goutput_dir=.' npm error gyp info spawn args ] npm error /bin/sh: python: command not found npm error gyp: Call to 'python commit_id.py check ..' returned exit status 127 while in angle/src/angle.gyp. while loading dependencies of binding.gyp while trying to load binding.gyp npm error gyp ERR! configure error npm error gyp ERR! stack Error: gyp failed with exit code: 1 npm error gyp ERR! stack at ChildProcess.onCpExit (node_modules/editly/node_modules/node-gyp/lib/configure.js:325:16) npm error gyp ERR! stack at ChildProcess.emit (node:events:519:28) npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12) npm error gyp ERR! System Darwin 23.6.0 npm error gyp ERR! command "/usr/local/Cellar/node@20/20.16.0/bin/node" "node_modules/editly/node_modules/.bin/node-gyp" "rebuild" npm error gyp ERR! cwd node_modules/editly/node_modules/gl npm error gyp ERR! node -v v20.16.0 npm error gyp ERR! node-gyp -v v9.4.1 npm error gyp ERR! not ok

MileanCo avatar Aug 15 '24 13:08 MileanCo

Is this bc I dont have python2 installed? I have python3 installed. Python2 is end of life so im not bothering installing that.

MileanCo avatar Aug 15 '24 14:08 MileanCo

same here

C00reNUT avatar Sep 03 '24 15:09 C00reNUT

same error here, any help?

sherlockwxl avatar Oct 01 '24 06:10 sherlockwxl

same here

benjamingorman avatar Nov 16 '24 02:11 benjamingorman

same here

vincentrolfs avatar Dec 18 '24 13:12 vincentrolfs

This is because editly is using an outdated version of gl without any pre-built binaries. The old version requires a manual build step on mac which must have some dependency issues.

I fixed this using npm/pnpm overrides to directly pin the version that it uses internally and now it works fine.

Example:

package.json

  {
  ...rest of package json,
  "pnpm": {
    "overrides": {
      "gl": "8.1.6"
    }
  }

Editly fix could be to update the gl dependency to latest version

emars avatar Dec 22 '24 22:12 emars

#282 fixes this. For now, you can install that directly from my fork:

npm install github:sailplan/editly

bkeepers avatar Jan 10 '25 18:01 bkeepers

Fixed in #282, which was merged today. I now have commit access and am working on getting a new release out soon. See https://github.com/mifi/editly/discussions/308 for more info.

bkeepers avatar Jan 17 '25 20:01 bkeepers