tree-sitter / tree-sitter-css

CSS grammar for Tree-sitter
MIT License
85 stars 34 forks source link

Fails to compile on node 12 #10

Closed darangi closed 4 years ago

darangi commented 4 years ago

Description

Fails to compile on node 12

Steps to Reproduce

  1. Ensure you are running on node 12
  2. Clone a copy of the repository if you don't have it
  3. Run npm install

Expected behavior: Compile successfully Actual behavior: The following errors are thrown

../src/binding.cc:13:6: error: variable has incomplete type 'void'
void Init(Handle<Object> exports, Handle<Object> module) {
     ^
../src/binding.cc:13:11: error: use of undeclared identifier 'Handle'
void Init(Handle<Object> exports, Handle<Object> module) {
          ^
../src/binding.cc:13:18: error: 'Object' does not refer to a value
void Init(Handle<Object> exports, Handle<Object> module) {
                 ^
/Users/musaibrahim/Library/Caches/node-gyp/12.13.1/include/node/v8.h:3400:17: note: 
      declared here
class V8_EXPORT Object : public Value {
                ^
../src/binding.cc:13:26: error: use of undeclared identifier 'exports'
void Init(Handle<Object> exports, Handle<Object> module) {
                         ^
../src/binding.cc:13:35: error: use of undeclared identifier 'Handle'
void Init(Handle<Object> exports, Handle<Object> module) {
                                  ^
../src/binding.cc:13:42: error: 'Object' does not refer to a value
void Init(Handle<Object> exports, Handle<Object> module) {
                                         ^
/Users/musaibrahim/Library/Caches/node-gyp/12.13.1/include/node/v8.h:3400:17: note: 
      declared here
class V8_EXPORT Object : public Value {
                ^
../src/binding.cc:13:50: error: use of undeclared identifier 'module'
void Init(Handle<Object> exports, Handle<Object> module) {
                                                 ^
../src/binding.cc:13:57: error: expected ';' after top level declarator
void Init(Handle<Object> exports, Handle<Object> module) {
                                                        ^
                                                        ;

Reproduces how often:

100%

darangi commented 4 years ago

Publishing a new patch will fix this issue, the error exist on v0.13.7

darangi commented 4 years ago

Thanks for the patch 🙇 @maxbrunsfeld