simonacca / tASTe

vscode extension for structural editing in 50+ languages
https://marketplace.visualstudio.com/items?itemName=simonacca.taste
MIT License
7 stars 0 forks source link

`tree-sitter-latex` fails to install #7

Closed simonacca closed 5 months ago

simonacca commented 5 months ago
$ npm i -D https://github.com/latex-lsp/tree-sitter-latex/tree/v0.4.0                           ~/Projects/2024/taste
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /nix/store/9zli090ri6wlhjla6bb51dg326ann92x-nodejs-20.12.2/bin/node /nix/store/9zli090ri6wlhjla6bb51dg326ann92x-nodejs-20.12.2/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/simon/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > @pfoerster/tree-sitter-latex@0.3.0 install
npm ERR! > node-gyp-build
npm ERR! 
npm ERR! 
npm ERR! make: Entering directory '/Users/simon/.npm/_cacache/tmp/git-clone5xMp7jKyZ13N/build'
npm ERR!   TOUCH Release/obj.target/node_modules/node-addon-api/node_addon_api_except.stamp
npm ERR!   CXX(target) Release/obj.target/tree_sitter_latex_binding/bindings/node/binding.o
npm ERR!   CC(target) Release/obj.target/tree_sitter_latex_binding/src/scanner.o
npm ERR! make: Leaving directory '/Users/simon/.npm/_cacache/tmp/git-clone5xMp7jKyZ13N/build'
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.12.2 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.12.3 found at "/opt/homebrew/opt/python@3.12/bin/python3.12"
npm ERR! gyp info spawn /opt/homebrew/opt/python@3.12/bin/python3.12
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/nix/store/9zli090ri6wlhjla6bb51dg326ann92x-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/simon/.npm/_cacache/tmp/git-clone5xMp7jKyZ13N/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/nix/store/9zli090ri6wlhjla6bb51dg326ann92x-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/simon/Library/Caches/node-gyp/20.12.2/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/simon/Library/Caches/node-gyp/20.12.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/nix/store/9zli090ri6wlhjla6bb51dg326ann92x-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/simon/Library/Caches/node-gyp/20.12.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/simon/.npm/_cacache/tmp/git-clone5xMp7jKyZ13N',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! ../src/scanner.c:4:10: fatal error: 'tree_sitter/parser.h' file not found
npm ERR! #include <tree_sitter/parser.h>
npm ERR!          ^~~~~~~~~~~~~~~~~~~~~~
npm ERR! 1 error generated.
npm ERR! make: *** [tree_sitter_latex_binding.target.mk:131: Release/obj.target/tree_sitter_latex_binding/src/scanner.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/nix/store/9zli090ri6wlhjla6bb51dg326ann92x-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
npm ERR! gyp ERR! System Darwin 23.4.0
npm ERR! gyp ERR! command "/nix/store/9zli090ri6wlhjla6bb51dg326ann92x-nodejs-20.12.2/bin/node" "/nix/store/9zli090ri6wlhjla6bb51dg326ann92x-nodejs-20.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /Users/simon/.npm/_cacache/tmp/git-clone5xMp7jKyZ13N
npm ERR! gyp ERR! node -v v20.12.2
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok 
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/simon/.npm/_cacache/tmp/git-clone5xMp7jKyZ13N
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node-gyp-build
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in: /Users/simon/.npm/_logs/2024-04-25T22_14_04_729Z-debug-0.log

npm ERR! A complete log of this run can be found in: /Users/simon/.npm/_logs/2024-04-25T22_14_02_077Z-debug-0.log
zsh: exit 1     npm i -D https://github.com/latex-lsp/tree-sitter-latex/tree/v0.4.0
simonacca commented 5 months ago

Closing without a solution for now, happy to reopen if somebody needs this