Skip to content

Issue installing on macOS #203

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

Open
jeanbaptistesouvestre opened this issue Nov 9, 2019 · 6 comments
Open

Issue installing on macOS #203

jeanbaptistesouvestre opened this issue Nov 9, 2019 · 6 comments

Comments

@jeanbaptistesouvestre
Copy link

Hello, I'm having issues installing this library on macOS
node: v12.12.0
npm: 6.11.3
macOS Cataline v10.15

Thanks in advance,

Error:

➜  test-webworker-threads-install npm install --save webworker-threads > bug.log
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:140:90: error: too few arguments to function call, single argument 'isolate' was not specified
        void    WriteLengthPrefixedString(const Local<String>& value)   { count += value->Utf8Length()+5; }
                                                                                   ~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2722:3: note: 'Utf8Length' declared here
  int Utf8Length(Isolate* isolate) const;
  ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:142:80: error: too few arguments to function call, single argument 'isolate' was not specified
        void    WriteString(const Local<String>& value)                                 { count += value->Utf8Length() + 1; }   // This returns the number of bytes exclusive of the NULL terminator
                                                                                                   ~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2722:3: note: 'Utf8Length' declared here
  int Utf8Length(Isolate* isolate) const;
  ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:165:92: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    void        WriteByte(const Local<Object>& object, const Local<String>& key)        { *p++ = object->Get(key)->Int32Value(); }
                                                                                                         ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:165:113: error: too few arguments to function call, single argument 'context' was not specified
    void        WriteByte(const Local<Object>& object, const Local<String>& key)        { *p++ = object->Get(key)->Int32Value(); }
                                                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2613:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:175:70: error: no matching member function for call to 'BooleanValue'
    void        WriteBool(const Local<Value>& value)                                    { WriteByte(value->BooleanValue() ? 1 : 0); }
                                                                                                    ~~~~~~~^~~~~~~~~~~~
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2603:8: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
  bool BooleanValue(Isolate* isolate) const;
       ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2606:51: note: candidate function not viable: requires single argument 'context', but no arguments were provided
                V8_WARN_UNUSED_RESULT Maybe<bool> BooleanValue(
                                                  ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:176:83: error: too few arguments to function call, single argument 'context' was not specified
    void        WriteInt32(const Local<Value>& value)                                   { WriteInt32(value->Int32Value());                      }
                                                                                                     ~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2613:3: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:177:97: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    void        WriteInt32(const Local<Object>& object, const Local<String>& key) { WriteInt32(object->Get(key)); }
                                                                                                       ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:178:85: error: too few arguments to function call, single argument 'context' was not specified
    void        WriteInt64(const Local<Value>& value)                                   { WriteInt64(value->IntegerValue());            }
                                                                                                     ~~~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2609:3: note: 'IntegerValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:179:86: error: too few arguments to function call, single argument 'context' was not specified
    void        WriteDouble(const Local<Value>& value)                                  { WriteDouble(value->NumberValue());            }
                                                                                                      ~~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2608:3: note: 'NumberValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:180:99: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
    void        WriteDouble(const Local<Object>& object, const Local<String>& key) { WriteDouble(object->Get(key)); }
                                                                                                         ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:182:92: error: too few arguments to function call, single argument 'isolate' was not specified
        void    WriteLengthPrefixedString(const Local<String>& value)   { WriteInt32(value->Utf8Length()+1); WriteString(value); }
                                                                                     ~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2722:3: note: 'Utf8Length' declared here
  int Utf8Length(Isolate* isolate) const;
  ^
In file included from ../src/WebWorkerThreads.cc:17:
In file included from ../src/bson.cc:41:
../src/bson.h:184:76: error: too few arguments to function call, expected at least 2, have 1
        void    WriteString(const Local<String>& value)                                 { p += value->WriteUtf8(p); }           // This returns the number of bytes inclusive of the NULL terminator.
                                                                                               ~~~~~~~~~~~~~~~~  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2782:3: note: 'WriteUtf8' declared here
  int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
  ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:51:10: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
        object->Get(key)->ToString()->Write(buffer, 0, 12);
                ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:51:20: error: no matching member function for call to 'ToString'
        object->Get(key)->ToString()->Write(buffer, 0, 12);
        ~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:71:41: error: too few arguments to function call, single argument 'isolate' was not specified
        size_t keyLength = keyName->Utf8Length();
                           ~~~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2722:3: note: 'Utf8Length' declared here
  int Utf8Length(Isolate* isolate) const;
  ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:77:36: error: too few arguments to function call, expected at least 2, have 1
        keyName->WriteUtf8(keyStringBuffer);
        ~~~~~~~~~~~~~~~~~~                ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2782:3: note: 'WriteUtf8' declared here
  int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
  ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:103:40: error: no matching member function for call to 'GetPropertyNames'
  Local<Array> propertyNames = object->GetPropertyNames();
                               ~~~~~~~~^~~~~~~~~~~~~~~~
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3567:43: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Array> GetPropertyNames(
                                          ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3569:43: note: candidate function not viable: requires at least 4 arguments, but 0 were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Array> GetPropertyNames(
                                          ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:109:62: error: no matching member function for call to 'ToString'
                const Local<String>& propertyName = propertyNames->Get(i)->ToString();
                                                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:109:54: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
                const Local<String>& propertyName = propertyNames->Get(i)->ToString();
                                                                   ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3461:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:112:47: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
                const Local<Value>& propertyValue = object->Get(propertyName);
                                                            ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3457:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:130:49: error: no matching member function for call to 'ToObject'
        Local<Array> array = Local<Array>::Cast(value->ToObject());
                                                ~~~~~~~^~~~~~~~
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2576:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                           ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2590:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<Object> ToObject(Isolate* isolate) const);
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:137:39: warning: 'Get' is deprecated: Use maybe version [-Wdeprecated-declarations]
                SerializeValue(typeLocation, array->Get(i));
                                                    ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:3461:3: note: 'Get' has been explicitly marked deprecated here
  V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
  declarator __attribute__((deprecated(message)))
                            ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:151:43: error: too few arguments to function call, single argument 'context' was not specified
                double doubleValue = value->NumberValue();
                                     ~~~~~~~~~~~~~~~~~~ ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2608:3: note: 'NumberValue' declared here
  V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
  ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8config.h:351:31: note: expanded from macro 'V8_WARN_UNUSED_RESULT'
#define V8_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:167:42: error: no matching member function for call to 'ToString'
                this->WriteLengthPrefixedString(value->ToString());
                                                ~~~~~~~^~~~~~~~
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:200:42: error: no matching member function for call to 'ToString'
                this->WriteLengthPrefixedString(value->ToString());
                                                ~~~~~~~^~~~~~~~
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2572:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2588:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<String> ToString(Isolate* isolate) const);
                              ^
In file included from ../src/WebWorkerThreads.cc:17:
../src/bson.cc:204:40: error: no matching member function for call to 'ToObject'
                const Local<Object>& object = value->ToObject();
                                              ~~~~~~~^~~~~~~~
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2576:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
                                           ^
/Users/jean-baptiste/Library/Caches/node-gyp/12.12.0/include/node/v8.h:2590:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
                Local<Object> ToObject(Isolate* isolate) const);
                              ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
7 warnings and 20 errors generated.
make: *** [Release/obj.target/WebWorkerThreads/src/WebWorkerThreads.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:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/Cellar/node/12.12.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jean-baptiste/ubble/pocs/test-webworker-threads-install/node_modules/webworker-threads
gyp ERR! node -v v12.12.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok 
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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/jean-baptiste/.npm/_logs/2019-11-09T18_17_53_010Z-debug.log
@tyler-g
Copy link

tyler-g commented Nov 19, 2019

I can confirm this issue still exists with latest node-gyp:

Mac OS: 10.14.6
node-gyp: 6.0.1
node: 11.0.0
npm: 6.9.0

Kind of surprised all these npm install issues are open and haven't been addressed hmmm

@Sabyasachig
Copy link

I am also facing the same issue. Any update on this one?

@ran-erez
Copy link

Same error here. Any updates?

@audreyt
Copy link
Owner

audreyt commented Mar 13, 2020

Since the code is in the BSON implementation from https://github.com/meteor/js-bson which has not been kept up with nan updates, this project has been maintaining the fork by itself.

As I've been a bit busy with #COVID19 mitigation work in my day job, I'd love help upgrading to the more actively developed upstream by MongoDB folks: https://github.com/mongodb-js/bson-ext

@PiotrNap
Copy link

PiotrNap commented May 2, 2020

Since the code is in the BSON implementation from https://github.com/meteor/js-bson which has not been kept up with nan updates, this project has been maintaining the fork by itself.

As I've been a bit busy with #COVID19 mitigation work in my day job, I'd love help upgrading to the more actively developed upstream by MongoDB folks: https://github.com/mongodb-js/bson-ext

So you say that there is no reasonable solution to this issue at the moment? :P
Just checking if I should go and look after a different tool to make my app working or not .

@audreyt
Copy link
Owner

audreyt commented May 3, 2020

Yes. Please check if https://www.npmjs.com/package/web-worker works for your purpose — I'm considering deprecating this module in favor of the new one.

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