tree-sitter-typescript
tree-sitter-typescript copied to clipboard
CONTRIBUTING.md?
Hello, I'm trying to test some things with tree-sitter-typescript, since https://github.com/tree-sitter/tree-sitter-javascript/pull/208 got merged recently.
However, I don't know how to do anything in this repo :sweat_smile:
looking at package.json, I see scripts -- but running them causes errors:
cd tree-sitter-typescript
npm install
# install succeeds
npm run build
> [email protected] build
> npm run build-typescript && npm run build-tsx
> [email protected] build-typescript
> cd typescript && npx tree-sitter generate --no-bindings
node:events:505
throw er; // Unhandled 'error' event
^
Error: spawn <repo>/node_modules/tree-sitter-cli/tree-sitter ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn <repo>/node_modules/tree-sitter-cli/tree-sitter',
path: '<repo>/node_modules/tree-sitter-cli/tree-sitter',
spawnargs: [ 'generate', '--no-bindings' ]
}}
Here is how I got passed the error -- feels very manual :thinking:
Download release here: https://github.com/tree-sitter/tree-sitter/releases/tag/v0.20.6
cd node_modules/tree-sitter-cli
cp /Downloads/tree-sitter-linux-x64.gz ./
gunzip tree-sitter-linux-x64.gz
ln -s tree-sitter-linux-x64 tree-sitter