tree-sitter / node-tree-sitter

Node.js bindings for tree-sitter
https://www.npmjs.com/package/tree-sitter
MIT License
649 stars 114 forks source link

Module not found Error #122

Open hoangvu99 opened 1 year ago

hoangvu99 commented 1 year ago

I got these errors when i tried to install "tree-sitter" and "tree-sitter-python"

WARNING in ./node_modules/tree-sitter-python/bindings/node/index.js 2:2-76 Module not found: Error: Can't resolve '../../build/Release/tree_sitter_python_binding'

WARNING in ./node_modules/tree-sitter-python/bindings/node/index.js 8:4-76 Module not found: Error: Can't resolve '../../build/Debug/tree_sitter_python_binding'

WARNING in ./node_modules/tree-sitter/index.js 3:12-66 Module not found: Error: Can't resolve './build/Release/tree_sitter_runtime_binding'

WARNING in ./node_modules/tree-sitter/index.js 6:14-66 Module not found: Error: Can't resolve './build/Debug/tree_sitter_runtime_binding'

Help me!

alehander92 commented 1 year ago

you need to use npm i in the tree-sitter-python folder: it seems to build the needed _binding files: at least this worked for a similar case for me