Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.

How to deploy to new chain? I'm getting errors while building #422

@chetankashetti

Description

@chetankashetti
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
X(Boolean)
^~~~~~~~~~
../../nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
      val->To ## TYPE(isolate->GetCurrentContext())                            \
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:2848:37: note: passing argument to parameter 'isolate' here
  Local<Boolean> ToBoolean(Isolate* isolate) const;
                                    ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: error: no member named 'FromMaybe' in 'v8::Local<v8::Boolean>'
X(Boolean)
^~~~~~~~~~
../../nan/nan_converters_43_inl.h:19:12: note: expanded from macro 'X'
          .FromMaybe(v8::Local<v8::TYPE>()));                                  \
           ^
../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Local<v8::Context>' to 'v8::Isolate *'
X(bool, Boolean)
^~~~~~~~~~~~~~~~
../../nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:2858:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:202:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from returned value of type 'bool' to function return type 'imp::ToFactory<bool>::return_t' (aka 'Maybe<bool>')
X(bool, Boolean)
^~~~~~~~~~~~~~~~
../../nan/nan_converters_43_inl.h:37:10: note: expanded from macro 'X'
  return val->NAME ## Value(isolate->GetCurrentContext());                     \
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:9968:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'bool' to 'const v8::Maybe<bool> &' for 1st argument
class Maybe {
      ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:9968:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'bool' to 'v8::Maybe<bool> &&' for 1st argument
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:10023:12: note: explicit constructor is not a candidate
  explicit Maybe(const T& t) : has_value_(true), value_(t) {}
           ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:203:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from 'v8::Isolate *' to 'Local<v8::Context>'
  return scope.Escape(v8::Function::New( isolate
                                         ^~~~~~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:190:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
      ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:190:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:194:13: note: candidate template ignored: could not match 'Local<S>' against 'v8::Isolate *'
  V8_INLINE Local(Local<S> that)
            ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:337:22: note: explicit constructor is not a candidate
  explicit V8_INLINE Local(T* that) : val_(that) {}
                     ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:4446:22: note: passing argument to parameter 'context' here
      Local<Context> context, FunctionCallback callback,
                     ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:203:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1
  return v8::StringObject::New(value).As<v8::StringObject>();
         ~~~~~~~~~~~~~~~~~~~~~      ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:5854:23: note: 'New' declared here
  static Local<Value> New(Isolate* isolate, Local<String> value);
                      ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1034:53: error: too few arguments to function call, single argument 'context' was not specified
      v8::Local<v8::String> string = from->ToString();
                                     ~~~~~~~~~~~~~~ ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:2810:44: note: 'ToString' declared here
  V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
                                           ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1034:29: error: no viable conversion from 'MaybeLocal<v8::String>' to 'v8::Local<v8::String>'
      v8::Local<v8::String> string = from->ToString();
                            ^        ~~~~~~~~~~~~~~~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:190:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'MaybeLocal<v8::String>' to 'const v8::Local<v8::String> &' for 1st argument
class Local {
      ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:190:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'MaybeLocal<v8::String>' to 'v8::Local<v8::String> &&' for 1st argument
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:194:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
  V8_INLINE Local(Local<S> that)
            ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:337:22: note: explicit constructor is not a candidate
  explicit V8_INLINE Local(T* that) : val_(that) {}
                     ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1044:37: error: cannot initialize a parameter of type 'v8::Isolate *' with an lvalue of type 'char *'
        length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
                                    ^~~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3037:26: note: passing argument to parameter 'isolate' here
  int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
                         ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1818:28: error: no matching member function for call to 'Set'
    New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
    ~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1824:28: error: no matching member function for call to 'Set'
    New(persistentHandle)->Set(key, value);
    ~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1830:28: error: no matching member function for call to 'Set'
    New(persistentHandle)->Set(index, value);
    ~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
                                    ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
  V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
                                    ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1836:32: error: no matching member function for call to 'Get'
        New(persistentHandle)->Get(New(key).ToLocalChecked()));
        ~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1842:48: error: no matching member function for call to 'Get'
    return scope.Escape(New(persistentHandle)->Get(key));
                        ~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/addon.cpp:4:
../../nan/nan.h:1847:48: error: no matching member function for call to 'Get'
    return scope.Escape(New(persistentHandle)->Get(index));
                        ~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
  V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
                                          ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2657:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object>'
    assert(persistent().IsNearDeath());
           ~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
                        ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2657:
../../nan/nan_object_wrap.h:67:18: error: no member named 'MarkIndependent' in 'Nan::Persistent<v8::Object>'
    persistent().MarkIndependent();
    ~~~~~~~~~~~~ ^
../../nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistent<v8::Object>'
    assert(wrap->handle_.IsNearDeath());
           ~~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
                        ^
In file included from ../src/addon.cpp:4:
In file included from ../../nan/nan.h:2753:
../../nan/nan_typedarray_contents.h:34:43: warning: 'GetContents' is deprecated: Use GetBackingStore. See http://crbug.com/v8/9908. [-Wdeprecated-declarations]
      data   = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
                                          ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:5272:3: note: 'GetContents' has been explicitly marked deprecated here
  V8_DEPRECATE_SOON("Use GetBackingStore. See http://crbug.com/v8/9908.")
  ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'
# define V8_DEPRECATE_SOON(message) [[deprecated(message)]]
                                      ^
In file included from ../src/addon.cpp:9:
In file included from ../src/KeccakNISTInterface.h:17:
../src/KeccakSponge.h:23:9: warning: 'ALIGN' macro redefined [-Wmacro-redefined]
#define ALIGN __attribute__ ((aligned(32)))
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/i386/param.h:85:9: note: previous definition is here
#define ALIGN(p)        __DARWIN_ALIGN(p)
        ^
../src/addon.cpp:36:64: error: too few arguments to function call, single argument 'context' was not specified
                hashlen = info[0]->IsUndefined() ? 512 : info[0]->Int32Value();
                                                         ~~~~~~~~~~~~~~~~~~~ ^
/Users/chetankumar/Library/Caches/node-gyp/14.17.0/include/node/v8.h:2869:40: note: 'Int32Value' declared here
  V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
                                       ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make: *** [Release/obj.target/sha3/src/addon.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/chetankumar/.nvm/versions/node/v14.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:376:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 22.5.0
gyp ERR! command "/Users/chetankumar/.nvm/versions/node/v14.17.0/bin/node" "/Users/chetankumar/.nvm/versions/node/v14.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/chetankumar/Unmarshal/ens/node_modules/sha3
gyp ERR! node -v v14.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sha3@1.2.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sha3@1.2.2 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/chetankumar/.npm/_logs/2023-05-27T11_59_31_345Z-debug.log

Node version: v14.17.0
Python version: v3.9.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions