Comments (4)
I've since had some success, in abandoning the tree-sitter
npm package in favor of the web-tree-sitter
npm package, building my parser to .wasm and using that instead.
from node-tree-sitter.
IIUC, if the performance is not an issue, going the .wasm
route has the advantage of not having to build for multiple architectures.
I understand that this is a route that seems to have worked out for some cases for VSCode extensions.
from node-tree-sitter.
There are few steps required to do what you want.
First, you need to rebuild it for electron, it will fix NODE_MODULE_VERSION message.
I used @electron/rebuild and set some environment variables from docs.
Second, after that you would face another message, related to memory sandbox, which is enabled in electron (and vscode).
Check this pr #177 to solve this issue.
And to fix No rule to make target 'Release/obj.target/tree_sitter/vendor/tree-sitter/lib/src/lib.o', needed by 'Release/obj.target/tree_sitter.a'
you probably need to download submodule, like this git submodule update --init --recursive
from node-tree-sitter.
Related Issues (20)
- Several warnings and lots of ugly output when installing from npm HOT 1
- Prebuild binaries for electron HOT 1
- salt
- .
- Silently fails while importing on VSCode extension debugger HOT 8
- Implicit use of wrong grammar when multiple grammar directories are present HOT 2
- electron version 19.0.17 HOT 3
- Special characters in rule names cause Uncaught SyntaxError HOT 2
- Electron error HOT 1
- BFS not working, some internal problem with cursor HOT 1
- Consider making Query matches/captures iterators
- Support for all query predicates supported by "official" tree sitter queries
- Tree.rootNode undefined in jest tests due to race condition HOT 2
- Repository name change name to tree-sitter-node HOT 2
- .
- The module 'l\node_modules\tree-sitter\build\Release\tree_sitter_runtime_binding.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 115. This version of Node.js requires NODE_MODULE_VERSION 118. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`) HOT 3
- Can't use in VS Code extension HOT 4
- Invalid language object with tree-sitter v0.21 - caused by NAPI? HOT 4
- node siter fails when included in a react based project and webpack >5 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-tree-sitter.