trying to 'npm install', getting node-gyp rebuild errors
ernestscomputer:musicomp ernest son$ npm install
> [email protected] install /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/bufferutil
> node-gyp rebuild
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/include/node'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/src'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/uv/include'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/v8/include'
make: *** [Release/obj.target/bufferutil/src/bufferutil.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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
> [email protected] install /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/utf-8-validate
> node-gyp rebuild
CXX(target) Release/obj.target/validation/src/validation.o
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/include/node'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/src'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/uv/include'
clang: error: no such file or directory: 'son/.node-gyp/5.0.0/deps/v8/include'
make: *** [Release/obj.target/validation/src/validation.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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/usr/local/Cellar/node/5.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/ernest son/Desktop/PROJECTS/musicomp/node_modules/utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
@nodox https://www.npmjs.com/package/v8-debug - link to their bug tracker on the right.
@gibfahn Used your solution here (https://github.com/nodejs/node-gyp/issues/809#issuecomment-356900158) and it worked like a charm. Thanks so much!
Delete your $HOME/.node-gyp directory and try again.
The solution by @bnoordhuis earlier in the thread worked for me on Linux
Thanks#809 (comment). It works.
Nothing is working for me I have so many issues going on right now. I'm getting this python error.. i don't even use python?!
I resolved a similar issue with a gyp build error on CentOS 6 — I just had to stop using the --force flag on my npm install. Apparently, using npm install --force is interpreted by node-sass to mean "build these binaries yourself even if you have cached copies."
I'm on Windows 10..Today started with me simply wanted to upload a project on heroku and database on mlab.. 10 hours later a bunch of things have broken and I can't even spin up the node server locally
I am seeing it use the wrong path. So instead of
$HOME/.nvm/versions/node/v9.10.1/lib/node_modules/node-gyp/bin/node-gyp.js
it's looking at
$HOME/.nvm/versions/node/v9.10.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
and I am using yarn. So for some reason it's resolving node-gyp as a submodule of npm instead of it globally. Now it's possible that some npm module have node-gyp as a child module, but I don't think this is the case for newer ones.
@richtera, I ran into this problem too and fixed it by downgrading from npm 5.8.0 to 5.7.0. See here: https://github.com/npm/npm/issues/20163
Ubuntu 16: sudo apt-get install libudev-dev managed to get my npm install running without issue.
@samgranger thanks the build-essentials worked for me ... but i don't know why haha
Worked for me
npm install node-gyp --python=python2.7
npm install web3 --python=python2.7
Additionally, the S3 bucket of a dependancy was down, so I had to manually install
npm install fsevents
downgrading to Node.js version 6.11.0 stopped these errors from happening for me...
I'm on MacOS HighSierra. So I had this issue today, and it was because I was using the Node 10.0, had to downgrade to lts Node 8.11.1 and everything does work.
Also on High Sierra. Initially installed Node via homebrew which installed 10.0.0.
In order to get npm install working I had to:
- Uninstall node via
brew uninstall node - Unlink previous node
brew unlink node - Install older version of node for me it was version 8
brew install node@8 - Link older version of node with
brew link --overwrite --force node@8
Hey , A little help required here. i am not able to figure out the error while installing realm. Following is the output
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp info check checked for "/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/compiled/node-v64_darwin_x64/realm.node" (not found)
node-pre-gyp http GET https://static.realm.io/node-pre-gyp/2.1.1/realm-v2.1.1-node-v64-darwin-x64.tar.gz
node-pre-gyp http 404 https://static.realm.io/node-pre-gyp/2.1.1/realm-v2.1.1-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/2.1.1/realm-v2.1.1-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp http 404 status code downloading tarball https://static.realm.io/node-pre-gyp/2.1.1/realm-v2.1.1-node-v64-darwin-x64.tar.gz
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/Users/aayushanand/Documents/mobility/nucleus20/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/aayushanand/Documents/mobility/nucleus20/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/aayushanand/.node-gyp/10.0.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/aayushanand/.node-gyp/10.0.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/aayushanand/Documents/mobility/nucleus20/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/aayushanand/.node-gyp/10.0.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
TOUCH Release/obj.target/OpenSSL.stamp
ACTION binding_gyp_vendored_realm_target_download_realm /Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/vendor/realm-mac-x64
Resolved requirements: { SYNC_SERVER_FOLDER: 'sync',
SYNC_ARCHIVE: 'realm-sync-node-cocoa-2.1.10.tar.gz',
SYNC_ARCHIVE_ROOT: 'realm-sync-node-cocoa-2.1.10' }
Matching lockfile already exists at target - nothing to do (use --force to override)
Success
TOUCH Release/obj.target/vendored-realm.stamp
TOUCH Release/obj.target/realm-core.stamp
TOUCH Release/obj.target/realm-sync.stamp
CXX(target) Release/obj.target/object-store/src/object-store/src/binding_callback_thread_observer.o
CXX(target) Release/obj.target/object-store/src/object-store/src/collection_notifications.o
CXX(target) Release/obj.target/object-store/src/object-store/src/index_set.o
CXX(target) Release/obj.target/object-store/src/object-store/src/list.o
CXX(target) Release/obj.target/object-store/src/object-store/src/object.o
CXX(target) Release/obj.target/object-store/src/object-store/src/placeholder.o
CXX(target) Release/obj.target/object-store/src/object-store/src/object_schema.o
CXX(target) Release/obj.target/object-store/src/object-store/src/object_store.o
CXX(target) Release/obj.target/object-store/src/object-store/src/results.o
CXX(target) Release/obj.target/object-store/src/object-store/src/schema.o
CXX(target) Release/obj.target/object-store/src/object-store/src/shared_realm.o
CXX(target) Release/obj.target/object-store/src/object-store/src/thread_safe_reference.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/collection_change_builder.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/collection_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/list_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/object_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/primitive_list_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/realm_coordinator.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/results_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/transact_log_handler.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/weak_realm_notifier.o
CXX(target) Release/obj.target/object-store/src/object-store/src/parser/parser.o
CXX(target) Release/obj.target/object-store/src/object-store/src/parser/query_builder.o
CXX(target) Release/obj.target/object-store/src/object-store/src/util/format.o
CXX(target) Release/obj.target/object-store/src/object-store/src/util/uuid.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/apple/external_commit_helper.o
CXX(target) Release/obj.target/object-store/src/object-store/src/impl/apple/keychain_helper.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/apple/network_reachability_observer.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/apple/system_configuration.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/partial_sync.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_config.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_manager.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_user.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_session.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/sync_file.o
CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/sync_metadata.o
LIBTOOL-STATIC Release/object-store.a
CXX(target) Release/obj.target/realm/src/js_realm.o
CXX(target) Release/obj.target/realm/src/node/node_init.o
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:306:25: error: no member named 'Callee' in 'v8::FunctionCallbackInfo<v8::Value>'
F(isolate, info.Callee(), info.This(), arguments.size(), arguments.data(), return_value);
~~~~ ^
../src/node/node_class.hpp:224:36: error: no viable conversion from 'const typename Types::PropertyGetterCallback' (aka 'void (*const)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'Local<v8::Name>'
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^~~~~~~~~~~~~~~
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::RealmClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_realm.hpp:333:68: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::RealmClass<realm::node::Types> >::create_constructor' requested here
FunctionType realm_constructor = ObjectWrap<T, RealmClass<T>>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const typename Types::PropertyGetterCallback' (aka 'void (*const)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'const v8::Local<v8::Name> &' for 1st argument
class Local {
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const typename Types::PropertyGetterCallback' (aka 'void (*const)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') to 'v8::Local<v8::Name> &&' for 1st argument
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:206:13: note: candidate template ignored: could not match 'Local<type-parameter-0-0>' against 'void (*)(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value> &)'
V8_INLINE Local(Local<S> that)
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:3215:43: note: passing argument to parameter 'name' here
Local<Context> context, Local<Name> name,
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:213:5: error: assigning to 'v8::Context *' from incompatible type 'v8::String *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:167:39: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^~~~~~~~~~~~~~~~~~
../src/node/node_class.hpp:224:25: note: in instantiation of function template specialization 'v8::Local<v8::Context>::Local<v8::String>' requested here
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::RealmClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_realm.hpp:333:68: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::RealmClass<realm::node::Types> >::create_constructor' requested here
FunctionType realm_constructor = ObjectWrap<T, RealmClass<T>>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:224:25: error: no viable conversion from 'Local<v8::String>' to 'Local<v8::Context>'
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^~~~~~~~~
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::CollectionClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_realm.hpp:334:78: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::CollectionClass<realm::node::Types> >::create_constructor' requested here
FunctionType collection_constructor = ObjectWrap<T, CollectionClass<T>>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:206:13: note: candidate template ignored: substitution failure [with S = v8::String]
V8_INLINE Local(Local<S> that)
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:3215:22: note: passing argument to parameter 'context' here
Local<Context> context, Local<Name> name,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:224:25: error: no viable conversion from 'Local<v8::String>' to 'Local<v8::Context>'
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^~~~~~~~~
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::ListClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_realm.hpp:335:66: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::ListClass<realm::node::Types> >::create_constructor' requested here
FunctionType list_constructor = ObjectWrap<T, ListClass<T>>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:206:13: note: candidate template ignored: substitution failure [with S = v8::String]
V8_INLINE Local(Local<S> that)
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:3215:22: note: passing argument to parameter 'context' here
Local<Context> context, Local<Name> name,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:224:25: error: no viable conversion from 'Local<v8::String>' to 'Local<v8::Context>'
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^~~~~~~~~
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::ResultsClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_realm.hpp:336:72: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::ResultsClass<realm::node::Types> >::create_constructor' requested here
FunctionType results_constructor = ObjectWrap<T, ResultsClass<T>>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:206:13: note: candidate template ignored: substitution failure [with S = v8::String]
V8_INLINE Local(Local<S> that)
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:3215:22: note: passing argument to parameter 'context' here
Local<Context> context, Local<Name> name,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:224:25: error: no viable conversion from 'Local<v8::String>' to 'Local<v8::Context>'
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^~~~~~~~~
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::RealmObjectClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_realm.hpp:337:81: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::RealmObjectClass<realm::node::Types> >::create_constructor' requested here
FunctionType realm_object_constructor = ObjectWrap<T, RealmObjectClass<T>>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:206:13: note: candidate template ignored: substitution failure [with S = v8::String]
V8_INLINE Local(Local<S> that)
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:3215:22: note: passing argument to parameter 'context' here
Local<Context> context, Local<Name> name,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:224:25: error: no viable conversion from 'Local<v8::String>' to 'Local<v8::Context>'
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^~~~~~~~~
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::SyncClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_sync.hpp:573:66: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::SyncClass<realm::node::Types> >::create_constructor' requested here
FunctionType sync_constructor = ObjectWrap<T, SyncClass<T>>::create_constructor(ctx);
^
../src/js_realm.hpp:346:51: note: in instantiation of member function 'realm::js::SyncClass<realm::node::Types>::create_constructor' requested here
FunctionType sync_constructor = SyncClass<T>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:206:13: note: candidate template ignored: substitution failure [with S = v8::String]
V8_INLINE Local(Local<S> that)
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:3215:22: note: passing argument to parameter 'context' here
Local<Context> context, Local<Name> name,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:224:25: error: no viable conversion from 'Local<v8::String>' to 'Local<v8::Context>'
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^~~~~~~~~
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::UserClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_sync.hpp:576:86: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::UserClass<realm::node::Types> >::create_constructor' requested here
Object::set_property(ctx, sync_constructor, "User", ObjectWrap<T, UserClass<T>>::create_constructor(ctx), attributes);
^
../src/js_realm.hpp:346:51: note: in instantiation of member function 'realm::js::SyncClass<realm::node::Types>::create_constructor' requested here
FunctionType sync_constructor = SyncClass<T>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:206:13: note: candidate template ignored: substitution failure [with S = v8::String]
V8_INLINE Local(Local<S> that)
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:3215:22: note: passing argument to parameter 'context' here
Local<Context> context, Local<Name> name,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:224:25: error: no viable conversion from 'Local<v8::String>' to 'Local<v8::Context>'
target->SetAccessor(prop_name, property.getter, property.setter ? property.setter : set_readonly_property, v8::Local<v8::Value>(), v8::DEFAULT, attributes);
^~~~~~~~~
../src/node/node_class.hpp:139:9: note: in instantiation of function template specialization 'realm::node::ObjectWrap<realm::js::SessionClass<realm::node::Types> >::setup_property<v8::Object>' requested here
setup_property<v8::Object>(constructor, pair.first, pair.second);
^
../src/js_sync.hpp:577:92: note: in instantiation of member function 'realm::node::ObjectWrap<realm::js::SessionClass<realm::node::Types> >::create_constructor' requested here
Object::set_property(ctx, sync_constructor, "Session", ObjectWrap<T, SessionClass<T>>::create_constructor(ctx), attributes);
^
../src/js_realm.hpp:346:51: note: in instantiation of member function 'realm::js::SyncClass<realm::node::Types>::create_constructor' requested here
FunctionType sync_constructor = SyncClass<T>::create_constructor(ctx);
^
../src/node/node_init.cpp:27:72: note: in instantiation of member function 'realm::js::RealmClass<realm::node::Types>::create_constructor' requested here
v8::Local<v8::Function> realm_constructor = js::RealmClass<Types>::create_constructor(isolate);
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'const v8::Local<v8::Context> &' for 1st argument
class Local {
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:202:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'v8::Local<v8::String>' to 'v8::Local<v8::Context> &&' for 1st argument
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:206:13: note: candidate template ignored: substitution failure [with S = v8::String]
V8_INLINE Local(Local<S> that)
^
/Users/aayushanand/.node-gyp/10.0.0/include/node/v8.h:3215:22: note: passing argument to parameter 'context' here
Local<Context> context, Local<Name> name,
^
10 errors generated.
make: *** [Release/obj.target/realm/src/node/node_init.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/aayushanand/Documents/mobility/nucleus20/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Darwin 16.7.0
gyp ERR! command "/usr/local/Cellar/node/8.2.1/bin/node" "/Users/aayushanand/Documents/mobility/nucleus20/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/compiled/node-v64_darwin_x64/realm.node" "--module_name=realm" "--module_path=/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/compiled/node-v64_darwin_x64"
gyp ERR! cwd /Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/8.2.1/bin/node /Users/aayushanand/Documents/mobility/nucleus20/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/compiled/node-v64_darwin_x64/realm.node --module_name=realm --module_path=/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/compiled/node-v64_darwin_x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/aayushanand/Documents/mobility/nucleus20/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:947:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:236:5)
node-pre-gyp ERR! System Darwin 16.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/8.2.1/bin/node" "/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm
node-pre-gyp ERR! node -v v10.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/8.2.1/bin/node /Users/aayushanand/Documents/mobility/nucleus20/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/aayushanand/Documents/mobility/nucleus20/node_modules/realm/compiled/node-v64_darwin_x64/realm.node --module_name=realm --module_path=/
@aayushanand99 see my comment or @GheorgheP comment above. Your issue looks similar.
Hello!
I too have the same problem. Have done ALL the solutions above, to no avail. Here is the output of npm install:
[email protected] install /home/centos/fiware/node_modules/mmmagic node-gyp rebuild
make: Entering directory /home/centos/fiware/node_modules/mmmagic/build'
CC(target) Release/obj.target/libmagic/deps/libmagic/src/apprentice.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/apptype.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/ascmagic.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/cdf.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/cdf_time.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/compress.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/der.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/encoding.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/fsmagic.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/funcs.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/is_tar.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/magic.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/print.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/readcdf.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/readelf.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/softmagic.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/fmtcheck.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/strlcat.o
CC(target) Release/obj.target/libmagic/deps/libmagic/src/strlcpy.o
AR(target) Release/obj.target/deps/libmagic/magic.a
COPY Release/magic.a
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_byte_order.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_chartables.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_compile.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_config.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_dfa_exec.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_exec.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_fullinfo.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_get.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_globals.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_jit_compile.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_maketables.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_newline.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_ord2utf8.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_refcount.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_string_utils.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_study.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_tables.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_ucd.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_valid_utf8.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_version.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcre_xclass.o
CC(target) Release/obj.target/libpcre/deps/libmagic/pcre/pcreposix.o
AR(target) Release/obj.target/deps/libmagic/pcre/pcre.a
COPY Release/pcre.a
CXX(target) Release/obj.target/magic/src/binding.o
cc1plus: error: unrecognized command line option "-std=gnu++1y"
make: *** [Release/obj.target/magic/src/binding.o] Error 1
make: Leaving directory /home/centos/fiware/node_modules/mmmagic/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/centos/.nvm/versions/node/v10.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Linux 2.6.32-696.23.1.el6.x86_64
gyp ERR! command "/home/centos/.nvm/versions/node/v10.0.0/bin/node" "/home/centos/.nvm/versions/node/v10.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/centos/fiware/node_modules/mmmagic
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
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! /home/centos/.npm/_logs/2018-05-03T15_24_26_950Z-debug.log
node.js v10.0.0 npm v5.6.0
I am using nvm to install node.js and the prefix points to /home/centos/.nvm/versions/node/v10.0.0. Does it have anything to do with it? Help, please. Thanks.
@daveabes' solution up there fixed the problem for me, running node 8.11.1, npm 6.0.0 on a pi.
sudo apt install libudev-dev && npm install
I had a problem with node version Wasn't working on 10.0.1 something like that, nor was it working on 8.1.3 but it worked on 9.11.1
Anyway, check your node version :D