为什么我会收到这些错误:“yarn add”上的“deasync”和“node build.js”、“fsevents”和“node install”、“node-gyp”、“make”错误

csf*_*bes 8 fsevents node.js node-gyp webpack node-deasync

请帮助我理解这个巨大的错误输出。此时我不知道哪一个结局是这样的。我已经为此绞尽脑汁好几天了。

\n\n

这不是一个/唯一一个给我带来这些错误的软件包安装,但项目无论如何都运行良好,所以我忽略了它。现在我想要一个新的软件包,但它无法安装。我没有建立这个项目。

\n\n

MacOS 10.14.6上使用React、Webpack 和 Yarn,通过. 我独立安装了Xcode 命令行工具,并安装了完整的XCode。自从收到这个项目以来,我没有打扰过该文件,但我相信我确实在某个时候通过纱线更新了一些包。nvmyarn.lock

\n\n
myprojectweb $ yarn add redux-persist\nyarn add v1.19.1\n[1/4]   Resolving packages...\n[2/4]   Fetching packages...\n[3/4]   Linking dependencies...\nwarning " > @date-io/moment@0.0.2" has incorrect peer dependency "moment@^2.22.2".\nwarning " > @material-ui/icons@3.0.2" has incorrect peer dependency "@material-ui/core@^3.0.0".\nwarning " > @material-ui/pickers@3.1.2" has unmet peer dependency "@date-io/core@^1.3.6".\nwarning " > connected-react-router@6.5.0" has unmet peer dependency "react-router@^4.3.1 || ^5.0.0".\nwarning " > mdi-material-ui@5.7.0" has incorrect peer dependency "@material-ui/core@^1.0.0 || ^3.0.0".\nwarning " > redux-persist@6.0.0" has incorrect peer dependency "redux@>4.0.0".\n[4/4]   Building fresh packages...\n[1/4] \xe2\xa0\x90 node-sass\n[2/4] \xe2\xa0\x90 deasync\n[-/4] \xe2\xa0\x90 waiting...\nerror /Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/deasync: Command failed.\nExit code: 1\nCommand: node ./build.js\nArguments: \nDirectory: /Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/deasync\nOutput:\ngyp info it worked if it ends with ok\ngyp info using node-gyp@5.0.5\ngyp info using node@12.13.0 | darwin | x64\ngyp info find Python using Python version 2.7.16 found at "/usr/bin/python"\ngyp info spawn /usr/bin/python\ngyp info spawn args [\ngyp info spawn args   \'/Users/csf/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py\',\ngyp info spawn args   \'binding.gyp\',\ngyp info spawn args   \'-f\',\ngyp info spawn args   \'make\',\ngyp info spawn args   \'-I\',\ngyp info spawn args   \'/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/deasync/build/config.gypi\',\ngyp info spawn args   \'-I\',\ngyp info spawn args   \'/Users/csf/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi\',\ngyp info spawn args   \'-I\',\ngyp info spawn args   \'/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/common.gypi\',\ngyp info spawn args   \'-Dlibrary=shared_library\',\ngyp info spawn args   \'-Dvisibility=default\',\ngyp info spawn args   \'-Dnode_root_dir=/Users/csf/Library/Caches/node-gyp/12.13.0\',\ngyp info spawn args   \'-Dnode_gyp_dir=/Users/csf/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp\',\ngyp info spawn args   \'-Dnode_lib_file=/Users/csf/Library/Caches/node-gyp/12.13.0/<(target_arch)/node.lib\',\ngyp info spawn args   \'-Dmodule_root_dir=/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/deasync\',\ngyp info spawn args   \'-Dnode_engine=v8\',\ngyp info spawn args   \'--depth=.\',\ngyp info spawn args   \'--no-parallel\',\ngyp info spawn args   \'--generator-output\',\ngyp info spawn args   \'build\',\ngyp info spawn args   \'-Goutput_dir=.\'\ngyp info spawn args ]\ngyp info spawn make\ngyp info spawn args [ \'BUILDTYPE=Release\', \'-C\', \'build\' ]\n  CXX(target) Release/obj.target/deasync/src/deasync.o\nIn file included from ../src/deasync.cc:3:\nIn file included from ../../nan/nan.h:221:\nIn file included from ../../nan/nan_converters.h:67:\n../../nan/nan_converters_43_inl.h:22:1: warning: \'ToBoolean\' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]\nX(Boolean)\n^\n../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro \'X\'\n      val->To ## TYPE(isolate->GetCurrentContext())                            \\\n           ^\n<scratch space>:213:1: note: expanded from here\nToBoolean\n^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2567:3: note: \'ToBoolean\' has been explicitly marked deprecated here\n  V8_DEPRECATED("ToBoolean can never throw. Use Local version.",\n  ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro \'V8_DEPRECATED\'\n  declarator __attribute__((deprecated(message)))\n                            ^\nIn file included from ../src/deasync.cc:3:\nIn file included from ../../nan/nan.h:221:\nIn file included from ../../nan/nan_converters.h:67:\n../../nan/nan_converters_43_inl.h:40:1: warning: \'BooleanValue\' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]\nX(bool, Boolean)\n^\n../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro \'X\'\n  return val->NAME ## Value(isolate->GetCurrentContext());                     \\\n              ^\n<scratch space>:220:1: note: expanded from here\nBooleanValue\n^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2605:3: note: \'BooleanValue\' has been explicitly marked deprecated here\n  V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",\n  ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro \'V8_DEPRECATED\'\n  declarator __attribute__((deprecated(message)))\n                            ^\nIn file included from ../src/deasync.cc:3:\nIn file included from ../../nan/nan.h:222:\nIn file included from ../../nan/nan_new.h:189:\n../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from \'v8::Isolate *\' to \'Local<v8::Context>\'\n  return scope.Escape(v8::Function::New( isolate\n                                         ^~~~~~~\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:183:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from \'v8::Isolate *\' to \'const v8::Local<v8::Context> &\' for 1st argument\nclass Local {\n      ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:183:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from \'v8::Isolate *\' to \'v8::Local<v8::Context> &&\' for 1st argument\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:187:13: note: candidate template ignored: could not match \'Local<type-parameter-0-0>\' against \'v8::Isolate *\'\n  V8_INLINE Local(Local<S> that)\n            ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:4171:22: note: passing argument to parameter \'context\' here\n      Local<Context> context, FunctionCallback callback,\n                     ^\nIn file included from ../src/deasync.cc:3:\nIn file included from ../../nan/nan.h:222:\nIn file included from ../../nan/nan_new.h:189:\n../../nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1\n  return v8::StringObject::New(value).As<v8::StringObject>();\n         ~~~~~~~~~~~~~~~~~~~~~      ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:5426:3: note: \'New\' declared here\n  static Local<Value> New(Isolate* isolate, Local<String> value);\n  ^\nIn file included from ../src/deasync.cc:3:\nIn file included from ../../nan/nan.h:222:\nIn file included from ../../nan/nan_new.h:189:\n../../nan/nan_implementation_12_inl.h:337:58: error: expected \'(\' for function-style cast or type construction\n  return v8::StringObject::New(value).As<v8::StringObject>();\n                                         ~~~~~~~~~~~~~~~~^\n../../nan/nan_implementation_12_inl.h:337:60: error: expected expression\n  return v8::StringObject::New(value).As<v8::StringObject>();\n                                                           ^\n
Run Code Online (Sandbox Code Playgroud)\n\n

...更多类似的跟踪错误,字符过多导致堆栈溢出...

\n\n
/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:563:3: note: \'MarkIndependent\' has been explicitly marked deprecated here\n  V8_DEPRECATED(\n  ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro \'V8_DEPRECATED\'\n  declarator __attribute__((deprecated(message)))\n                            ^\nIn file included from ../src/deasync.cc:3:\nIn file included from ../../nan/nan.h:2690:\n../../nan/nan_object_wrap.h:124:26: error: no member named \'IsNearDeath\' in \'Nan::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> >\'\n    assert(wrap->handle_.IsNearDeath());\n           ~~~~~~~~~~~~~ ^\n/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:93:25: note: expanded from macro \'assert\'\n    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)\n                        ^\n9 warnings and 8 errors generated.\nmake: *** [Release/obj.target/deasync/src/deasync.o] Error 1\ngyp ERR! build error \ngyp ERR! stack Error: `make` failed with exit code: 2\ngyp ERR! stack     at ChildProcess.onExit (/Users/csf/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)\ngyp ERR! stack     at ChildProcess.emit (events.js:210:5)\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)\ngyp ERR! System Darwin 18.7.0\ngyp ERR! command "/Users/csf/.nvm/versions/node/v12.13.0/bin/node" "/Users/csf/.nvm/versions/node/v12.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"\ngyp ERR! cwd /Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/deasync\ngyp ERR! node -v v12.13.0\ngyp ERR! node-gyp -v v5.0.5\n\n\n\nwarning Error running install script for optional dependency: "/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: node install\nArguments: \nDirectory: /Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/fsevents\nOutput:\nnode-pre-gyp info it worked if it ends with ok\nnode-pre-gyp info using node-pre-gyp@0.10.0\nnode-pre-gyp info using node@12.13.0 | darwin | x64\nnode-pre-gyp info check checked for \\"/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\\" (not found)\nnode-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz\nnode-pre-gyp http 404 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz\nnode-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz \nnode-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.4 and node@12.13.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) \nnode-pre-gyp http 404 status code downloading tarball https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.4/fse-v1.2.4-node-v72-darwin-x64.tar.gz \ngyp info it worked if it ends with ok\ngyp info using node-gyp@5.0.3\ngyp info using node@12.13.0 | darwin | x64\ngyp info ok \ngyp info it worked if it ends with ok\ngyp info using node-gyp@5.0.3\ngyp info using node@12.13.0 | darwin | x64\ngyp info find Python using Python version 2.7.16 found at \\"/usr/bin/python\\"\ngyp info spawn /usr/bin/python\ngyp info spawn args [\ngyp info spawn args   \'/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/node-gyp/gyp/gyp_main.py\',\ngyp info spawn args   \'binding.gyp\',\ngyp info spawn args   \'-f\',\ngyp info spawn args   \'make\',\ngyp info spawn args   \'-I\',\ngyp info spawn args   \'/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/fsevents/build/config.gypi\',\ngyp info spawn args   \'-I\',\ngyp info spawn args   \'/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/node-gyp/addon.gypi\',\ngyp info spawn args   \'-I\',\ngyp info spawn args   \'/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/common.gypi\',\ngyp info spawn args   \'-Dlibrary=shared_library\',\ngyp info spawn args   \'-Dvisibility=default\',\ngyp info spawn args   \'-Dnode_root_dir=/Users/csf/Library/Caches/node-gyp/12.13.0\',\ngyp info spawn args   \'-Dnode_gyp_dir=/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/node-gyp\',\ngyp info spawn args   \'-Dnode_lib_file=/Users/csf/Library/Caches/node-gyp/12.13.0/<(target_arch)/node.lib\',\ngyp info spawn args   \'-Dmodule_root_dir=/Users/csf/Documents/ORG/Local on disk/Projects - local/myproject/myprojectweb/node_modules/fsevents\',\ngyp info spawn args   \'-Dnode_engine=v8\',\ngyp info spawn args   \'--depth=.\',\ngyp info spawn args   \'--no-parallel\',\ngyp info spawn args   \'--generator-output\',\ngyp info spawn args   \'build\',\ngyp info spawn args   \'-Goutput_dir=.\'\ngyp info spawn args ]\ngyp info ok \ngyp info it worked if it ends with ok\ngyp info using node-gyp@5.0.3\ngyp info using node@12.13.0 | darwin | x64\ngyp info spawn make\ngyp info spawn args [ \'BUILDTYPE=Release\', \'-C\', \'build\' ]\n  SOLINK_MODULE(target) Release/.node\n  CXX(target) Release/obj.target/fse/fsevents.o\nIn file included from ../fsevents.cc:6:\nIn file included from ../../nan/nan.h:221:\nIn file included from ../../nan/nan_converters.h:67:\n../../nan/nan_converters_43_inl.h:22:1: warning: \'ToBoolean\' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]\nX(Boolean)\n^\n../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro \'X\'\n      val->To ## TYPE(isolate->GetCurrentContext())                            \\\\\\n           ^\n<scratch space>:213:1: note: expanded from here\nToBoolean\n^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2567:3: note: \'ToBoolean\' has been explicitly marked deprecated here\n  V8_DEPRECATED(\\"ToBoolean can never throw. Use Local version.\\",\n  ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro \'V8_DEPRECATED\'\n  declarator __attribute__((deprecated(message)))\n                            ^\nIn file included from ../fsevents.cc:6:\nIn file included from ../../nan/nan.h:221:\nIn file included from ../../nan/nan_converters.h:67:\n../../nan/nan_converters_43_inl.h:40:1: warning: \'BooleanValue\' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]\nX(bool, Boolean)\n^\n../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro \'X\'\n  return val->NAME ## Value(isolate->GetCurrentContext());                     \\\\\\n              ^\n<scratch space>:220:1: note: expanded from here\nBooleanValue\n^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:2605:3: note: \'BooleanValue\' has been explicitly marked deprecated here\n  V8_DEPRECATED(\\"BooleanValue can never throw. Use Isolate version.\\",\n  ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro \'V8_DEPRECATED\'\n  declarator __attribute__((deprecated(message)))\n                            ^\nIn file included from ../fsevents.cc:6:\nIn file included from ../../nan/nan.h:222:\nIn file included from ../../nan/nan_new.h:189:\n../../nan/nan_implementation_12_inl.h:103:42: error: no viable conversion from \'v8::Isolate *\' to \'Local<v8::Context>\'\n  return scope.Escape(v8::Function::New( isolate\n                                         ^~~~~~~\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:183:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from \'v8::Isolate *\' to \'const v8::Local<v8::Context> &\' for 1st argument\nclass Local {\n      ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:183:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from \'v8::Isolate *\' to \'v8::Local<v8::Context> &&\' for 1st argument\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:187:13: note: candidate template ignored: could not match \'Local<type-parameter-0-0>\' against \'v8::Isolate *\'\n  V8_INLINE Local(Local<S> that)\n            ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:4171:22: note: passing argument to parameter \'context\' here\n      Local<Context> context, FunctionCallback callback,\n                     ^\nIn file included from ../fsevents.cc:6:\nIn file included from ../../nan/nan.h:222:\nIn file included from ../../nan/nan_new.h:189:\n../../nan/nan_implementation_12_inl.h:337:37: error: too few arguments to function call, expected 2, have 1\n  return v8::StringObject::New(value).As<v8::StringObject>();\n         ~~~~~~~~~~~~~~~~~~~~~      ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:5426:3: note: \'New\' declared here\n  static Local<Value> New(Isolate* isolate, Local<String> value);\n  ^\n
Run Code Online (Sandbox Code Playgroud)\n\n

...更多类似的跟踪错误,字符过多导致堆栈溢出...

\n\n
In file included from ../fsevents.cc:82:\n../src/constants.cc:107:11: warning: \'Set\' is deprecated: Use maybe version [-Wdeprecated-declarations]\n  object->Set(Nan::New<v8::String>(\\"kFSEventStreamEventFlagItemIsDir\\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsDir));\n          ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: \'Set\' has been explicitly marked deprecated here\n  V8_DEPRECATED(\\"Use maybe version\\",\n  ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro \'V8_DEPRECATED\'\n  declarator __attribute__((deprecated(message)))\n                            ^\nIn file included from ../fsevents.cc:82:\n../src/constants.cc:108:11: warning: \'Set\' is deprecated: Use maybe version [-Wdeprecated-declarations]\n  object->Set(Nan::New<v8::String>(\\"kFSEventStreamEventFlagItemIsSymlink\\").ToLocalChecked(), Nan::New<v8::Integer>(kFSEventStreamEventFlagItemIsSymlink));\n          ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8.h:3402:3: note: \'Set\' has been explicitly marked deprecated here\n  V8_DEPRECATED(\\"Use maybe version\\",\n  ^\n/Users/csf/Library/Caches/node-gyp/12.13.0/include/node/v8config.h:311:29: note: expanded from macro \'V8_DEPRECATED\'\n  declarator __attribute__((deprecated(message)))\n                            ^\n../fsevents.cc:85:16: error: variable has incomplete type \'void\'\nvoid FSEvents::Initialize(v8::Handle<v8::Object> exports) {\n               ^\n../fsevents.cc:85:31: error: no member named \'Handle\' in namespace \'v8\'\nvoid FSEvents::Initialize(v8::Handle<v8::Object> exports) {\n                          ~~~~^\n../fsevents.cc:85:48: error: expected \'(\' for function-style cast or type construction\nvoid FSEvents::Initialize(v8::Handle<v8::Object> exports) {\n                                     ~~~~~~~~~~^\n../fsevents.cc:85:50: error: use of undeclared identifier \'exports\'\nvoid FSEvents::Initialize(v8::Handle<v8::Object> exports) {\n                                                 ^\n../fsevents.cc:85:58: error: expected \';\' after top level declarator\nvoid FSEvents::Initialize(v8::Handle<v8::Object> exports) {\n                                                         ^\n                                                         ;\n30 warnings and 14 errors generated.\nmake: *** [Release/obj.target/fse/fsevents.o] Error 1\ngyp ERR! build error \ngyp ERR! stack Error: `make` failed with exit code: 2\ngyp ERR! stack     at ChildProcess.onExit (/Users/csf/Documents/ORG/Local on disk/Project

csf*_*bes 4

我不知道为什么这会起作用,但是运行常规的纱线升级可以清除错误。我仍然收到有关依赖性的警告。

我应该在升级前后保存yarn-outdated的终端输出,但可惜我没有。

我仍然显示一些不匹配的依赖关系。