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

Error when running npm install #1

Open
zietbukuel opened this issue Feb 10, 2021 · 3 comments
Open

Error when running npm install #1

zietbukuel opened this issue Feb 10, 2021 · 3 comments

Comments

@zietbukuel
Copy link

I get the following error message when I try to run "npm install":

make: *** [binding.target.mk:131: Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/home/user/mautic-theme-skeleton/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/user/mautic-theme-skeleton/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-62-generic
gyp ERR! command "/usr/bin/node" "/home/user/mautic-theme-skeleton/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/user/mautic-theme-skeleton/node_modules/node-sass
gyp ERR! node -v v12.20.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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/user/.npm/_logs/2021-02-10T17_45_24_359Z-debug.log

npm -v
6.14.10

node -v
v12.20.1

@corvis
Copy link
Member

corvis commented Feb 10, 2021

The error indicates the issue during node-sass compilation. There might be some more lines before the fragment you published which could explain the root cause.

Anyway check what prevents node-sass from beining installed maybe you don't have some library required by node-sass

@zietbukuel
Copy link
Author

These are all the error messages before that one. However, I have node-sass installed for other sites in this same machine and it compiles without errors. Could this mean that the package is probably outdated or incompatible with my current node/npm setup?

In file included from ../../nan/nan_converters.h:67,
                 from ../../nan/nan.h:221,
                 from ../src/binding.cpp:1:
../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ToFactoryBase<v8::Boolean>::return_t Nan::imp::ToFactory<v8::Boolean>::convert(v8::Local<v8::Value>)’:
../../nan/nan_converters_43_inl.h:18:51: warning: ‘v8::MaybeLocal<v8::Boolean> v8::Value::ToBoolean(v8::Local<v8::Context>) const’ is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
   18 |       val->To ## TYPE(isolate->GetCurrentContext())                            \
      |                                                   ^
../../nan/nan_converters_43_inl.h:22:1: note: in expansion of macro ‘X’
   22 | X(Boolean)
      | ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:2664:59: note: declared here
 2664 |                 V8_WARN_UNUSED_RESULT MaybeLocal<Boolean> ToBoolean(
      |                                                           ^~~~~~~~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../../nan/nan_converters.h:67,
                 from ../../nan/nan.h:221,
                 from ../src/binding.cpp:1:
../../nan/nan_converters_43_inl.h: In static member function ‘static Nan::imp::ValueFactoryBase<bool>::return_t Nan::imp::ToFactory<bool>::convert(v8::Local<v8::Value>)’:
../../nan/nan_converters_43_inl.h:37:57: warning: ‘v8::Maybe<bool> v8::Value::BooleanValue(v8::Local<v8::Context>) const’ is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
   37 |   return val->NAME ## Value(isolate->GetCurrentContext());                     \
      |                                                         ^
../../nan/nan_converters_43_inl.h:40:1: note: in expansion of macro ‘X’
   40 | X(bool, Boolean)
      | ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:2702:51: note: declared here
 2702 |                 V8_WARN_UNUSED_RESULT Maybe<bool> BooleanValue(
      |                                                   ^~~~~~~~~~~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../../nan/nan_new.h:189,
                 from ../../nan/nan.h:222,
                 from ../src/binding.cpp:1:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::Function>::return_t Nan::imp::Factory<v8::Function>::New(Nan::FunctionCallback, v8::Local<v8::Value>)’:
../../nan/nan_implementation_12_inl.h:103:42: error: cannot convert ‘v8::Isolate*’ to ‘v8::Local<v8::Context>’
  103 |   return scope.Escape(v8::Function::New( isolate
      |                                          ^~~~~~~
      |                                          |
      |                                          v8::Isolate*
In file included from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:4276:22: note:   initializing argument 1 of ‘static v8::MaybeLocal<v8::Function> v8::Function::New(v8::Local<v8::Context>, v8::FunctionCallback, v8::Local<v8::Value>, int, v8::ConstructorBehavior, v8::SideEffectType)’
 4276 |       Local<Context> context, FunctionCallback callback,
      |       ~~~~~~~~~~~~~~~^~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
../../nan/nan.h:1064:78: warning: ‘v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
 1064 |       v8::Local<v8::String> string = from->ToString(v8::Isolate::GetCurrent());
      |                                                                              ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:2684:31: note: declared here
 2684 |                 Local<String> ToString(Isolate* isolate) const);
      |                               ^~~~~~~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
../../nan/nan.h:1855:64: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
 1855 |     New(persistentHandle)->Set(New(key).ToLocalChecked(), value);
      |                                                                ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const v8::Local<v8::String>&, const v8::Local<v8::Value>&)’:
../../nan/nan.h:1861:42: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
 1861 |     New(persistentHandle)->Set(key, value);
      |                                          ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(uint32_t, const v8::Local<v8::Value>&)’:
../../nan/nan.h:1867:44: warning: ‘bool v8::Object::Set(uint32_t, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
 1867 |     New(persistentHandle)->Set(index, value);
      |                                            ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:3508:22: note: declared here
 3508 |                 bool Set(uint32_t index, Local<Value> value));
      |                      ^~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
../../nan/nan.h:1873:61: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
 1873 |         New(persistentHandle)->Get(New(key).ToLocalChecked()));
      |                                                             ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:3553:51: note: declared here
 3553 |   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      |                                                   ^~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const v8::Local<v8::String>&) const’:
../../nan/nan.h:1879:55: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
 1879 |     return scope.Escape(New(persistentHandle)->Get(key));
      |                                                       ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:3553:51: note: declared here
 3553 |   V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key));
      |                                                   ^~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(uint32_t) const’:
../../nan/nan.h:1884:57: warning: ‘v8::Local<v8::Value> v8::Object::Get(uint32_t)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
 1884 |     return scope.Escape(New(persistentHandle)->Get(index));
      |                                                         ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:3557:51: note: declared here
 3557 |   V8_DEPRECATED("Use maybe version", Local<Value> Get(uint32_t index));
      |                                                   ^~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2208:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
 2208 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |                                                              ^
In file included from /usr/include/c++/9/cassert:44,
                 from /home/user/.node-gyp/12.20.1/include/node/node_object_wrap.h:26,
                 from ../../nan/nan.h:54,
                 from ../src/binding.cpp:1:
../../nan/nan_object_wrap.h: In destructor ‘virtual Nan::ObjectWrap::~ObjectWrap()’:
../../nan/nan_object_wrap.h:24:25: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
   24 |     assert(persistent().IsNearDeath());
      |                         ^~~~~~~~~~~
In file included from ../../nan/nan.h:2698,
                 from ../src/binding.cpp:1:
../../nan/nan_object_wrap.h: In member function ‘void Nan::ObjectWrap::MakeWeak()’:
../../nan/nan_object_wrap.h:67:34: warning: ‘void v8::PersistentBase<T>::MarkIndependent() [with T = v8::Object]’ is deprecated: Weak objects are always considered independent. Use TracedGlobal when trying to use EmbedderHeapTracer. Use a strong handle when trying to keep an object alive. [-Wdeprecated-declarations]
   67 |     persistent().MarkIndependent();
      |                                  ^
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:570:22: note: declared here
  570 |       V8_INLINE void MarkIndependent());
      |                      ^~~~~~~~~~~~~~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
In file included from /usr/include/c++/9/cassert:44,
                 from /home/user/.node-gyp/12.20.1/include/node/node_object_wrap.h:26,
                 from ../../nan/nan.h:54,
                 from ../src/binding.cpp:1:
../../nan/nan_object_wrap.h: In static member function ‘static void Nan::ObjectWrap::WeakCallback(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’:
../../nan/nan_object_wrap.h:124:26: error: ‘class Nan::Persistent<v8::Object>’ has no member named ‘IsNearDeath’
  124 |     assert(wrap->handle_.IsNearDeath());
      |                          ^~~~~~~~~~~
../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cpp:285:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  285 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
      |                                                                                                  ^~~~~~~~~~~~
../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cpp:321:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
  321 |     int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
      |                                                                                                  ^~~~~~~~~~~~
In file included from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
../src/binding.cpp: At global scope:
/home/user/.node-gyp/12.20.1/include/node/node.h:737:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
  737 |       (node::addon_register_func) (regfunc),                          \
      |                                           ^
/home/user/.node-gyp/12.20.1/include/node/node.h:771:3: note: in expansion of macro ‘NODE_MODULE_X’
  771 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
      |   ^~~~~~~~~~~~~
../src/binding.cpp:359:1: note: in expansion of macro ‘NODE_MODULE’
  359 | NODE_MODULE(binding, RegisterModule);
      | ^~~~~~~~~~~
In file included from ../src/binding.cpp:1:
../../nan/nan.h: In instantiation of ‘void Nan::imp::SetMethodAux(T, v8::Local<v8::String>, v8::Local<v8::FunctionTemplate>, ...) [with T = v8::Local<v8::Object>]’:
../../nan/nan.h:2394:20:   required from ‘void Nan::SetMethod(HandleType<T>, const char*, Nan::FunctionCallback) [with T = v8::Object; HandleType = v8::Local; Nan::FunctionCallback = void (*)(const Nan::FunctionCallbackInfo<v8::Value>&)]’
../src/binding.cpp:351:42:   required from here
../../nan/nan.h:2378:3: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
 2378 |   recv->Set(name, GetFunction(tpl).ToLocalChecked());
      |   ^~~~
In file included from /home/user/.node-gyp/12.20.1/include/node/v8-internal.h:14,
                 from /home/user/.node-gyp/12.20.1/include/node/v8.h:27,
                 from /home/user/.node-gyp/12.20.1/include/node/node.h:67,
                 from ../../nan/nan.h:52,
                 from ../src/binding.cpp:1:
/home/user/.node-gyp/12.20.1/include/node/v8.h:3499:22: note: declared here
 3499 |                 bool Set(Local<Value> key, Local<Value> value));
      |                      ^~~
/home/user/.node-gyp/12.20.1/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
  328 |   declarator __attribute__((deprecated(message)))
      |   ^~~~~~~~~~
make: *** [binding.target.mk:131: Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/home/user/mautic-theme-skeleton/node_modules/node-sass/build'

@corvis
Copy link
Member

corvis commented Feb 10, 2021

That might be the case. You should try to update node-sass version in package.json

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

2 participants