Dev*_*tan 4 node.js npm npm-install
我在执行命令 npm -i env-cmd --save dev 时收到此错误
\n我想要添加 env-cmd 节点模块并使用 npm 并希望将 ot 保存为 devDependency 但每次运行上述命令时都会遇到以下错误
\ninotify@1.4.6 安装 /home/dev/Documents/task_manager_app/node_modules/inotify\n> node-gyp 重建
\nmake: Entering directory '/home/dev/Documents/task_manager_app/node_modules/inotify/build'\n CXX(target) Release/obj.target/inotify/src/bindings.o\nIn file included from ../src/node_inotify.h:14,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n../../nan/nan.h: In function \xe2\x80\x98void Nan::AsyncQueueWorker(Nan::AsyncWorker*)\xe2\x80\x99:\n../../nan/nan.h:2294:62: warning: cast between incompatible function types from \xe2\x80\x98void (*)(uv_work_t*)\xe2\x80\x99 {aka \xe2\x80\x98void (*)(uv_work_s*)\xe2\x80\x99} to \xe2\x80\x98uv_after_work_cb\xe2\x80\x99 {aka \xe2\x80\x98void (*)(uv_work_s*, int)\xe2\x80\x99} [-Wcast-function-type]\n 2294 | , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)\n | ^\nIn file included from ../src/bindings.cc:2:\n../src/bindings.h: At global scope:\n../src/bindings.h:10:27: error: \xe2\x80\x98Handle\xe2\x80\x99 has not been declared\n 10 | static void Initialize(Handle<Object> target);\n | ^~~~~~\n../src/bindings.h:10:33: error: expected \xe2\x80\x98,\xe2\x80\x99 or \xe2\x80\x98...\xe2\x80\x99 before \xe2\x80\x98<\xe2\x80\x99 token\n 10 | static void Initialize(Handle<Object> target);\n | ^\n../src/bindings.cc:11:27: error: variable or field \xe2\x80\x98Initialize\xe2\x80\x99 declared void\n 11 | void Inotify::Initialize(Handle<Object> exports) {\n | ^~~~~~\n../src/bindings.cc:11:27: error: \xe2\x80\x98Handle\xe2\x80\x99 was not declared in this scope\n../src/bindings.cc:11:40: error: expected primary-expression before \xe2\x80\x98>\xe2\x80\x99 token\n 11 | void Inotify::Initialize(Handle<Object> exports) {\n | ^\n../src/bindings.cc:11:42: error: \xe2\x80\x98exports\xe2\x80\x99 was not declared in this scope\n 11 | void Inotify::Initialize(Handle<Object> exports) {\n | ^~~~~~~\n../src/bindings.cc: In static member function \xe2\x80\x98static Nan::NAN_METHOD_RETURN_TYPE NodeInotify::Inotify::AddWatch(Nan::NAN_METHOD_ARGS_TYPE)\xe2\x80\x99:\n../src/bindings.cc:146:43: error: no matching function for call to \xe2\x80\x98v8::Value::ToObject()\xe2\x80\x99\n 146 | Local<Object> args_ = info[0]->ToObject();\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2532:44: note: candidate: \xe2\x80\x98v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const\xe2\x80\x99\n 2532 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(\n | ^~~~~~~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2532:44: note: candidate expects 1 argument, 0 provided\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/node/v8.h:25,\n from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2546:35: note: candidate: \xe2\x80\x98v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const\xe2\x80\x99\n 2546 | Local<Object> ToObject(Isolate* isolate) const);\n | ^~~~~~~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2546:35: note: candidate expects 1 argument, 0 provided\n 2546 | Local<Object> ToObject(Isolate* isolate) const);\n | ^~~~~~~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n../src/bindings.cc:149:27: error: no matching function for call to \xe2\x80\x98v8::Object::Has(v8::Local<v8::String>&)\xe2\x80\x99\n 149 | if (!args_->Has(path_sym)) {\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3449:37: note: candidate: \xe2\x80\x98v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>)\xe2\x80\x99\n 3449 | V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context,\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3449:37: note: candidate expects 2 arguments, 1 provided\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3455:37: note: candidate: \xe2\x80\x98v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t)\xe2\x80\x99\n 3455 | V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index);\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3455:37: note: candidate expects 2 arguments, 1 provided\n../src/bindings.cc:154:31: error: no matching function for call to \xe2\x80\x98v8::Object::Has(v8::Local<v8::String>&)\xe2\x80\x99\n 154 | if (!args_->Has(callback_sym) ||\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3449:37: note: candidate: \xe2\x80\x98v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>)\xe2\x80\x99\n 3449 | V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context,\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3449:37: note: candidate expects 2 arguments, 1 provided\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3455:37: note: candidate: \xe2\x80\x98v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t)\xe2\x80\x99\n 3455 | V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index);\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3455:37: note: candidate expects 2 arguments, 1 provided\n../src/bindings.cc:155:28: warning: \xe2\x80\x98v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)\xe2\x80\x99 is deprecated: Use maybe version [-Wdeprecated-declarations]\n 155 | !args_->Get(callback_sym)->IsFunction()) {\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/node/v8.h:25,\n from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3412:55: note: declared here\n 3412 | V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n../src/bindings.cc:160:32: error: no matching function for call to \xe2\x80\x98v8::Object::Has(v8::Local<v8::String>&)\xe2\x80\x99\n 160 | if (!args_->Has(watch_for_sym)) {\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3449:37: note: candidate: \xe2\x80\x98v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>)\xe2\x80\x99\n 3449 | V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context,\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3449:37: note: candidate expects 2 arguments, 1 provided\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3455:37: note: candidate: \xe2\x80\x98v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t)\xe2\x80\x99\n 3455 | V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index);\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3455:37: note: candidate expects 2 arguments, 1 provided\n../src/bindings.cc:163:33: warning: \xe2\x80\x98v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)\xe2\x80\x99 is deprecated: Use maybe version [-Wdeprecated-declarations]\n 163 | if (!args_->Get(watch_for_sym)->IsInt32()) {\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/node/v8.h:25,\n from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3412:55: note: declared here\n 3412 | V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n../src/bindings.cc:166:36: warning: \xe2\x80\x98v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)\xe2\x80\x99 is deprecated: Use maybe version [-Wdeprecated-declarations]\n 166 | mask |= args_->Get(watch_for_sym)->Int32Value();\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/node/v8.h:25,\n from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3412:55: note: declared here\n 3412 | V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n../src/bindings.cc:166:50: error: no matching function for call to \xe2\x80\x98v8::Value::Int32Value()\xe2\x80\x99\n 166 | mask |= args_->Get(watch_for_sym)->Int32Value();\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2569:40: note: candidate: \xe2\x80\x98v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const\xe2\x80\x99\n 2569 | V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;\n | ^~~~~~~~~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2569:40: note: candidate expects 1 argument, 0 provided\n../src/bindings.cc:172:45: warning: \xe2\x80\x98v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)\xe2\x80\x99 is deprecated: Use maybe version [-Wdeprecated-declarations]\n 172 | String::Utf8Value path(args_->Get(path_sym));\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/node/v8.h:25,\n from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3412:55: note: declared here\n 3412 | V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n../src/bindings.cc:172:46: error: no matching function for call to \xe2\x80\x98v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)\xe2\x80\x99\n 172 | String::Utf8Value path(args_->Get(path_sym));\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2995:5: note: candidate: \xe2\x80\x98v8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>)\xe2\x80\x99\n 2995 | Utf8Value(Isolate* isolate, Local<v8::Value> obj);\n | ^~~~~~~~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2995:5: note: candidate expects 2 arguments, 1 provided\n../src/bindings.cc:182:61: warning: \xe2\x80\x98v8::Local<v8::Value> v8::Object::Get(v8::Local<v8::Value>)\xe2\x80\x99 is deprecated: Use maybe version [-Wdeprecated-declarations]\n 182 | inotify->handle()->Set(descriptor, args_->Get(callback_sym));\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/node/v8.h:25,\n from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3412:55: note: declared here\n 3412 | V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Local<Value> key));\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n../src/bindings.cc:182:62: warning: \xe2\x80\x98bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)\xe2\x80\x99 is deprecated: Use maybe version [-Wdeprecated-declarations]\n 182 | inotify->handle()->Set(descriptor, args_->Get(callback_sym));\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/node/v8.h:25,\n from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3359:26: note: declared here\n 3359 | bool Set(Local<Value> key, Local<Value> value));\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n../src/bindings.cc: In static member function \xe2\x80\x98static Nan::NAN_METHOD_RETURN_TYPE NodeInotify::Inotify::RemoveWatch(Nan::NAN_METHOD_ARGS_TYPE)\xe2\x80\x99:\n../src/bindings.cc:195:31: error: no matching function for call to \xe2\x80\x98v8::Value::Int32Value()\xe2\x80\x99\n 195 | watch = info[0]->Int32Value();\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2569:40: note: candidate: \xe2\x80\x98v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const\xe2\x80\x99\n 2569 | V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;\n | ^~~~~~~~~~\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:2569:40: note: candidate expects 1 argument, 0 provided\n../src/bindings.cc: In static member function \xe2\x80\x98static void NodeInotify::Inotify::Callback(uv_poll_t*, int, int)\xe2\x80\x99:\n../src/bindings.cc:262:86: warning: \xe2\x80\x98bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)\xe2\x80\x99 is deprecated: Use maybe version [-Wdeprecated-declarations]\n 262 | obj->Set(Nan::New<String>("watch").ToLocalChecked(), Nan::New<Integer>(event->wd));\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/node/v8.h:25,\n from /home/dev/.node-gyp/12.0.0/include/node/node.h:63,\n from ../src/node_inotify.h:5,\n from ../src/bindings.h:4,\n from ../src/bindings.cc:2:\n/home/dev/.node-gyp/12.0.0/include/node/v8.h:3359:26: note: declared here\n 3359 | bool Set(Local<Value> key, Local<Value> value));\n | ^~~\n/home/dev/.node-gyp/12.0.0/include/node/v8config.h:322:3: note: in definition of macro \xe2\x80\x98V8_DEPRECATE_SOON\xe2\x80\x99\n 322 | declarator __attribute__((deprecated(message)))\n | ^~~~~~~~~~\n../src/bindings.cc:263:87: warning: \xe2\x80\x98bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)\xe2\x80\x99 is deprecated: Use maybe version [-Wdeprecated-declarations]\n 263 | obj->Set(Nan::New<String>("mask").ToLocalChecked(), Nan::New<Integer>(event->mask));\n | ^\nIn file included from /home/dev/.node-gyp/12.0.0/include/node/v8-internal.h:14,\n from /home/dev/.node-gyp/12.0.0/include/n
| 归档时间: |
|
| 查看次数: |
2310 次 |
| 最近记录: |