Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails during compilation #131

Closed
dctucker opened this issue May 22, 2019 · 9 comments
Closed

Installation fails during compilation #131

dctucker opened this issue May 22, 2019 · 9 comments

Comments

@dctucker
Copy link

Just trying to get started with this and Visual Studio Code, having trouble installing it on Mac OS 10.14.5.

~$ npm i -g bash-language-server
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
/usr/local/bin/bash-language-server -> /usr/local/lib/node_modules/bash-language-server/bin/main.js

> tree-sitter@0.13.23 install /usr/local/lib/node_modules/bash-language-server/node_modules/tree-sitter
> prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=12.1.0 runtime=node arch=x64 libc= platform=darwin)
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/get_changed_ranges.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/language.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/lexer.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/node.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/stack.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/parser.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/subtree.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/tree.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/tree_cursor.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/src/runtime/utf16.o
  CC(target) Release/obj.target/runtime/vendor/tree-sitter/externals/utf8proc/utf8proc.o
  LIBTOOL-STATIC Release/runtime.a
  CXX(target) Release/obj.target/tree_sitter_runtime_binding/src/binding.o
  CXX(target) Release/obj.target/tree_sitter_runtime_binding/src/conversions.o
../src/conversions.cc:32:12: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  exports->Set(Nan::New("pointTransferArray").ToLocalChecked(), Uint32Array::New(js_point_transfer_buffer, 0, 2));
           ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:42:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  result->Set(Nan::New(start_position_key), PointToJS(range.start_point));
          ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:43:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  result->Set(Nan::New(start_index_key), ByteCountToJS(range.start_byte));
          ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:44:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  result->Set(Nan::New(end_position_key), PointToJS(range.end_point));
          ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:45:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  result->Set(Nan::New(end_index_key), ByteCountToJS(range.end_byte));
          ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:68:3: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
  INIT(start_point, start_position_key, PointFromJS);
  ^
../src/conversions.cc:60:33: note: expanded from macro 'INIT'
    auto field = Type(js_range->Get(Nan::New(key))); \
                                ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3412:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:69:3: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
  INIT(end_point, end_position_key, PointFromJS);
  ^
../src/conversions.cc:60:33: note: expanded from macro 'INIT'
    auto field = Type(js_range->Get(Nan::New(key))); \
                                ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3412:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:70:3: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
  INIT(start_byte, start_index_key, ByteCountFromJS);
  ^
../src/conversions.cc:60:33: note: expanded from macro 'INIT'
    auto field = Type(js_range->Get(Nan::New(key))); \
                                ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3412:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:71:3: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
  INIT(end_byte, end_index_key, ByteCountFromJS);
  ^
../src/conversions.cc:60:33: note: expanded from macro 'INIT'
    auto field = Type(js_range->Get(Nan::New(key))); \
                                ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3412:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:80:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  result->Set(Nan::New(row_key), Nan::New<Number>(point.row));
          ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:81:11: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations]
  result->Set(Nan::New(column_key), ByteCountToJS(point.column));
          ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3358:3: note: 'Set' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version",
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:92:35: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
  Local<Value> js_row = js_point->Get(Nan::New(row_key));
                                  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3412:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:98:38: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
  Local<Value> js_column = js_point->Get(Nan::New(column_key));
                                     ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:3412:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:322:29: note: expanded from macro 'V8_DEPRECATE_SOON'
  declarator __attribute__((deprecated(message)))
                            ^
../src/conversions.cc:105:41: error: too few arguments to function call, single argument 'context' was not specified
  if (std::isfinite(js_row->NumberValue())) {
                    ~~~~~~~~~~~~~~~~~~~ ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:2564:3: note: 'NumberValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/conversions.cc:106:52: error: too few arguments to function call, single argument 'context' was not specified
    row = static_cast<uint32_t>(js_row->Int32Value());
                                ~~~~~~~~~~~~~~~~~~ ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/conversions.cc:111:44: error: too few arguments to function call, single argument 'context' was not specified
  if (std::isfinite(js_column->NumberValue())) {
                    ~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:2564:3: note: 'NumberValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/conversions.cc:112:58: error: too few arguments to function call, single argument 'context' was not specified
    column = static_cast<uint32_t>(js_column->Int32Value()) * BYTES_PER_CHARACTER;
                                   ~~~~~~~~~~~~~~~~~~~~~ ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:2569:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
../src/conversions.cc:130:47: error: too few arguments to function call, single argument 'context' was not specified
  return Nan::Just<uint32_t>(arg->Uint32Value() * BYTES_PER_CHARACTER);
                             ~~~~~~~~~~~~~~~~ ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8.h:2567:3: note: 'Uint32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
  ^
/Users/dctucker/.node-gyp/12.1.0/include/node/v8config.h:347:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
13 warnings and 5 errors generated.
make: *** [Release/obj.target/tree_sitter_runtime_binding/src/conversions.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:196:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.1.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/bash-language-server/node_modules/tree-sitter
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tree-sitter@0.13.23 install: `prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tree-sitter@0.13.23 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dctucker/.npm/_logs/2019-05-22T13_58_39_101Z-debug.log

2019-05-22T13_58_39_101Z-debug.log

@alex-popov-tech
Copy link

Any updates here?

@dctucker
Copy link
Author

Using node 11.14.0 seems to work. Latest does not.

@alex-popov-tech
Copy link

Confirm that 11.14.0 is working via nvm. But anyways it would be great to use it with latest node versions

@milanecode
Copy link

Any advice on how to wirte the command to install the nvm i -g bash-language-server under 11.14.0?

@alex-popov-tech
Copy link

@milanecode

nvm install 11.14.0
nvm use 11.14.0
nvm alias default 11.14.0
npm install -g bash-language-server

@carlowahlstedt
Copy link

Still broken on 12.4.0 but switching to v11.14.0 did fix the install.

@jasonmorganson
Copy link

Ref: tree-sitter/node-tree-sitter#46

@skovhus
Copy link
Collaborator

skovhus commented Sep 23, 2019

We have just released a new version of bash-language-server (1.6.0) that:

  • supports node > 8 (including 12)
  • should remove all installation issues caused by node-gyp and native bindings

To upgrade run:

npm i -g bash-language-server

Let us know if this works for you. Thanks :)

@KevOrr @dctucker

@skovhus
Copy link
Collaborator

skovhus commented Dec 13, 2019

With the new version (1.4.0) of the VS Code extension, we got rid of the manual npm install step of the bash-language-server. Hopefully, this will resolve npm installation issues. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants