Comments (3)
your npm run rebuild
command needs to match the Electron version of your VS Code. Open VS Code, press in the top left About Visual Studio Code, copy the "Electron: 27.2.3" (or whatever) string then change the rebuild command in package.json to
"rebuild": "electron-rebuild --version 27.2.3"
from node-tree-sitter.
I have the same problem when importing tree-sitter in a simple electron template, then I rebuild successfully as above said.
But the app can't start owing to the error:
[9776:0223/013812.099:ERROR:node_bindings.cc(154)] Fatal error in V8: v8_ArrayBuffer_NewBackingStore When the V8 Sandbox is enabled, ArrayBuffer backing stores must be allocated inside the sandbox address space. Please use an appropriate ArrayBuffer::Allocator to allocate these buffers, or disable the sandbox.
[9776:0223/013812.099:ERROR:crashpad_client_win.cc(863)] not connected
I found the description about the problem in electron document:
How will I know if my app is impacted by this change?
Attempting to wrap external memory with an ArrayBuffer will crash at runtime in Electron 20+.
If you don't use any native Node modules in your app, you're safe—there's no way to trigger this crash from pure JS. This change only affects native Node modules which allocate memory outside of the V8 heap (e.g. using malloc or new) and then wrap the external memory with an ArrayBuffer. This is a fairly rare use case, but some modules do use this technique, and such modules will need to be refactored in order to be compatible with Electron 20+.
I also read the #177 , but is seems that the problem still occurs.
from node-tree-sitter.
Related Issues (20)
- void Tree::GetChangedRanges(const Nan::FunctionCallbackInfo<Value> &info) { const Tree *tree = ObjectWrap::Unwrap<Tree>(info.This()); const Tree *other_tree = UnwrapTree(info[0]); if (!other_tree) { Nan::ThrowTypeError("Argument must be a tree"); return; } uint32_t range_count; TSRange *ranges = ts_tree_get_changed_ranges(tree->tree_, other_tree->tree_, &range_count); Local<Array> result = Nan::New<Array>(); for (size_t i = 0; i < range_count; i++) { Nan::Set(result, i, RangeToJS(ranges[i])); } info.GetReturnValue().Set(result); } HOT 2
- Tree sitter Node bindings segfault when accessing certain properties HOT 5
- 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
- Node module version mismatch when integrating tree-sitter with VS Code extension HOT 4
- 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
- .
- Can't use in VS Code extension HOT 4
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.