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

Compile error on MacOS X (node 13.7.0): no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *' #45

Open
q-lukasz opened this issue Jan 28, 2020 · 3 comments

Comments

@q-lukasz
Copy link

Lukaszs-MacBook-Pro:a milimetr$ ls
package.json
Lukaszs-MacBook-Pro:a milimetr$ npm install font-manager

> font-manager@0.3.1 install /private/tmp/a/node_modules/font-manager
> node-gyp rebuild

  CXX(target) Release/obj.target/fontmanager/src/FontManager.o
In file included from ../src/FontManager.cc:6:
../src/FontDescriptor.h:176:51: error: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *'
      return value.ToLocalChecked()->BooleanValue(Nan::GetCurrentContext()).FromJust();
                                                  ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/milimetr/Library/Caches/node-gyp/13.7.0/include/node/v8.h:2771:30: note: passing argument to parameter 'isolate' here
  bool BooleanValue(Isolate* isolate) const;
                             ^
1 error generated.
make: *** [Release/obj.target/fontmanager/src/FontManager.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:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:321:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/13.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/tmp/a/node_modules/font-manager
gyp ERR! node -v v13.7.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN a@1.0.0 No description
npm WARN a@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! font-manager@0.3.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the font-manager@0.3.1 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/milimetr/.npm/_logs/2020-01-28T16_55_07_593Z-debug.log
Lukaszs-MacBook-Pro:a milimetr$

Mac OS X 10.12.6
iTerm2 3.3.4

@q-lukasz
Copy link
Author

node 13.7.0

@q-lukasz q-lukasz changed the title Compile error on MacOS X: no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *' Compile error on MacOS X (node 13.7.0): no viable conversion from 'v8::Local<v8::Context>' to 'v8::Isolate *' Jan 28, 2020
q-lukasz added a commit to q-lukasz/font-manager that referenced this issue Jan 28, 2020
mrspartak added a commit to storyteq/font-manager that referenced this issue Jul 14, 2022
…-node-13-7

Fixed compile error (issue foliojs#45) - upgraded nan to >= 2.14.0 and fixed…
@Jayce-liang
Copy link

how to fix it

@hidemydreams
Copy link

facing the same on macos m1 node 14 during npm ci

`../../nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Local' to 'Isolate '
X(Boolean)
^~~~~~~~~~
../../nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
val->To ## TYPE(isolate->GetCurrentContext())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:2848:37: note: passing argument to parameter 'isolate' here
Local ToBoolean(Isolate
isolate) const;
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:221:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: error: no member named 'FromMaybe' in 'v8::Localv8::Boolean'
X(Boolean)
^~~~~~~~~~
../../nan/nan_converters_43_inl.h:19:12: note: expanded from macro 'X'
.FromMaybe(v8::Localv8::TYPE()));
^
../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Local' to 'Isolate '
X(bool, Boolean)
^~~~~~~~~~~~~~~~
../../nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:2858:30: note: passing argument to parameter 'isolate' here
bool BooleanValue(Isolate
isolate) const;
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:221:
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::return_t' (aka 'Maybe')
X(bool, Boolean)
^~~~~~~~~~~~~~~~
../../nan/nan_converters_43_inl.h:37:10: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:9968:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'bool' to 'const v8::Maybe &' for 1st argument
class Maybe {
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:9968:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'bool' to 'v8::Maybe &&' for 1st argument
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/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 ../fsevents.cc:6:
In file included from ../../nan/nan.h:222:
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'
return scope.Escape(v8::Function::New( isolate
^~~~~~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:190:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Isolate *' to 'const v8::Localv8::Context &' for 1st argument
class Local {
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:190:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Isolate *' to 'v8::Localv8::Context &&' for 1st argument
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:194:13: note: candidate template ignored: could not match 'Local' against 'v8::Isolate '
V8_INLINE Local(Local that)
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:337:22: note: explicit constructor is not a candidate
explicit V8_INLINE Local(T
that) : val_(that) {}
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:4446:22: note: passing argument to parameter 'context' here
Local context, FunctionCallback callback,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1064:53: error: no viable conversion from 'Isolate *' to 'Local'
v8::Localv8::String string = from->ToString(v8::Isolate::GetCurrent());
^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:190:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'Isolate ' to 'const v8::Localv8::Context &' for 1st argument
class Local {
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:190:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'Isolate ' to 'v8::Localv8::Context &&' for 1st argument
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:194:13: note: candidate template ignored: could not match 'Local' against 'Isolate '
V8_INLINE Local(Local that)
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:337:22: note: explicit constructor is not a candidate
explicit V8_INLINE Local(T
that) : val_(that) {}
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:2811:22: note: passing argument to parameter 'context' here
Local context) const;
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1064:29: error: no viable conversion from 'MaybeLocal' to 'v8::Localv8::String'
v8::Localv8::String string = from->ToString(v8::Isolate::GetCurrent());
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:190:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'MaybeLocal' to 'const v8::Localv8::String &' for 1st argument
class Local {
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:190:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'MaybeLocal' to 'v8::Localv8::String &&' for 1st argument
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:194:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local that)
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/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 ../fsevents.cc:6:
../../nan/nan.h:1855:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1861:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(key, value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1867:28: error: no matching member function for call to 'Set'
New(persistentHandle)->Set(index, value);
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3670:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context,
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3673:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1873:32: error: no matching member function for call to 'Get'
New(persistentHandle)->Get(New(key).ToLocalChecked()));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1879:48: error: no matching member function for call to 'Get'
return scope.Escape(New(persistentHandle)->Get(key));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
In file included from ../fsevents.cc:6:
../../nan/nan.h:1884:48: error: no matching member function for call to 'Get'
return scope.Escape(New(persistentHandle)->Get(index));
~~~~~~~~~~~~~~~~~~~~~~~^~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3717:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8.h:3720:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
^
In file included from ../fsevents.cc:6:
In file included from ../../nan/nan.h:2698:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistentv8::Object'
assert(persistent().IsNearDeath());
~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/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 ../fsevents.cc:6:
In file included from ../../nan/nan.h:2698:
../../nan/nan_object_wrap.h:67:18: error: no member named 'MarkIndependent' in 'Nan::Persistentv8::Object'
persistent().MarkIndependent();
~~~~~~~~~~~~ ^
../../nan/nan_object_wrap.h:124:26: error: no member named 'IsNearDeath' in 'Nan::Persistentv8::Object'
assert(wrap->handle
.IsNearDeath());
~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/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 ../fsevents.cc:6:
In file included from ../../nan/nan.h:2794:
../../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/nazararchakou/Library/Caches/node-gyp/14.21.3/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/nazararchakou/Library/Caches/node-gyp/14.21.3/include/node/v8config.h:402:39: note: expanded from macro 'V8_DEPRECATE_SOON'

define V8_DEPRECATE_SOON(message) [[deprecated(message)]]

                                  ^

../fsevents.cc:50:32: error: no template named 'Handle' in namespace 'v8'
static void Initialize(v8::Handlev8::Object exports);
~~~~^
../fsevents.cc:63:6: warning: field 'async_resource' will be initialized after field 'lockStarted' [-Wreorder-ctor]
: async_resource("fsevents:FSEvents"), lockStarted(false) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
lockStarted(false) async_resource("fsevents:FSEvents")
In file included from ../fsevents.cc:82:
../src/constants.cc:89:11: error: no matching member function for call to 'Set'
object->Set(Nan::Newv8::String("kFSEventStreamEventFlagNone").ToLocalChecked(), Nan::Newv8::Integer(kFSEventStreamEventFlagNone));

/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/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/nazararchakou/Library/Caches/node-gyp/14.21.3/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 ../fsevents.cc:82:
../src/constants.cc:90:11: error: no matching member function for call to 'Set'
object->Set(Nan::New<v8::String>("kFSEventStreamEventFlagMustScanSubDirs").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagMustScanSubDirs));
~~~~~~~~^~~
/Users/nazararchakou/Library/Caches/node-gyp/14.21.3/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/nazararchakou/Library/Caches/node-gyp/14.21.3/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,
                                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/nazararchakou/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Darwin 22.6.0
gyp ERR! command "/Users/nazararchakou/.nvm/versions/node/v14.21.3/bin/node" "/Users/nazararchakou/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents/lib/binding/Release/node-v83-darwin-arm64/fse.node" "--module_name=fse" "--module_path=/Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents/lib/binding/Release/node-v83-darwin-arm64" "--napi_version=8" "--node_abi_napi=napi"
gyp ERR! cwd /Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents
gyp ERR! node -v v14.21.3
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/Users/nazararchakou/.nvm/versions/node/v14.21.3/bin/node /Users/nazararchakou/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents/lib/binding/Release/node-v83-darwin-arm64/fse.node --module_name=fse --module_path=/Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents/lib/binding/Release/node-v83-darwin-arm64 --napi_version=8 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1088:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
node-pre-gyp ERR! System Darwin 22.6.0
node-pre-gyp ERR! command "/Users/nazararchakou/.nvm/versions/node/v14.21.3/bin/node" "/Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents
node-pre-gyp ERR! node -v v14.21.3
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok 
Failed to execute '/Users/nazararchakou/.nvm/versions/node/v14.21.3/bin/node /Users/nazararchakou/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents/lib/binding/Release/node-v83-darwin-arm64/fse.node --module_name=fse --module_path=/Users/nazararchakou/Documents/work/honaro/honaro-client/node_modules/fsevents/lib/binding/Release/node-v83-darwin-arm64 --napi_version=8 --node_abi_napi=napi' (1)
added 2903 packages in 248.746s
`

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

3 participants