创建新的 React Native 项目时出现问题:运行可选依赖项的安装脚本时出错:fsevents:命令失败

Jon*_*ono 5 node.js node-gyp react-native yarnpkg

我得到以下信息:我认为它与 python 有关,因为我只是摆弄我的 python 环境,但无法弄清楚:

\n\n
\xe2\x9d\xaf yarn --version\n1.16.0\n
Run Code Online (Sandbox Code Playgroud)\n\n
\xe2\x9d\xaf node --version\nv10.15.2\n
Run Code Online (Sandbox Code Playgroud)\n\n
\xe2\x9d\xaf python --version\nPython 2.7.16\n
Run Code Online (Sandbox Code Playgroud)\n\n
\xe2\x9d\xaf which python\n/usr/local/bin/python\n
Run Code Online (Sandbox Code Playgroud)\n\n
Error running install script for optional dependency: "/Users/jordan/Desktop/RnDiffApp/node_modules/fsevents: Command failed.\nExit code: 1\nCommand: node-gyp rebuild\nArguments:\nDirectory: /Users/jordan/Desktop/RnDiffApp/node_modules/fsevents\nOutput:\ngyp info it worked if it ends with ok\ngyp info using node-gyp@3.8.0\ngyp info using node@8.10.0 | darwin | x64\ngyp http GET https://nodejs.org/download/release/v8.10.0/node-v8.10.0-headers.tar.gz\ngyp http 200 https://nodejs.org/download/release/v8.10.0/node-v8.10.0-headers.tar.gz\ngyp http GET https://nodejs.org/download/release/v8.10.0/SHASUMS256.txt\ngyp http 200 https://nodejs.org/download/release/v8.10.0/SHASUMS256.txt\ngyp info spawn /usr/bin/python2.7\ngyp info spawn args [ \'/Users/jordan/.nvm/versions/node/v8.10.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/jordan/Desktop/RnDiffApp/node_modules/fsevents/build/config.gypi\',\ngyp info spawn args   \'-I\',\ngyp info spawn args   \'/Users/jordan/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi\',\ngyp info spawn args   \'-I\',\ngyp info spawn args   \'/Users/jordan/.node-gyp/8.10.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/jordan/.node-gyp/8.10.0\',\ngyp info spawn args   \'-Dnode_gyp_dir=/Users/jordan/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/node-gyp\',\ngyp info spawn args   \'-Dnode_lib_file=/Users/jordan/.node-gyp/8.10.0/<(target_arch)/node.lib\',\ngyp info spawn args   \'-Dmodule_root_dir=/Users/jordan/Desktop/RnDiffApp/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 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:53:\nIn file included from /Users/jordan/.node-gyp/8.10.0/include/node/uv.h:56:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\nIn file included from /usr/local/include/stdint.h:59:\n/usr/local/include/stdint.h:2:10: error: #include nested too deeply\n#include <stddef.h>\n         ^\n/usr/local/include/stdint.h:59:11: error: #include nested too deeply\n# include <stdint.h>\n          ^\n/usr/local/include/stdint.h:72:11: error: #include nested too deeply\n# include <sys/types.h>\n          ^\n/usr/local/include/stdint.h:76:10: error: #include nested too deeply\n#include <limits.h>\n         ^\n/usr/local/include/stdint.h:82:11: error: #include nested too deeply\n# include <inttypes.h>\n          ^\nIn file included from ../fsevents.cc:6:\nIn file included from ../../nan/nan.h:53:\nIn file included from /Users/jordan/.node-gyp/8.10.0/include/node/uv.h:62:\nIn file included from /Users/jordan/.node-gyp/8.10.0/include/node/uv-unix.h:28:\nIn file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/dirent.h:135:\nIn file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdlib.h:94:\nIn file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:66:\nIn file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/wait.h:110:\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:197:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_user_time;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:198:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_system_time;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:199:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_pkg_idle_wkups;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:200:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_interrupt_wkups;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:201:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_pageins;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:202:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_wired_size;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:203:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_resident_size;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:204:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_phys_footprint;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:205:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_proc_start_abstime;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:206:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_proc_exit_abstime;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:211:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_user_time;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:212:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_system_time;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:213:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_pkg_idle_wkups;\n        ^\n/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/resource.h:214:2: error: unknown type name \'uint64_t\'\n        uint64_t ri_interrupt_wkups;\n        ^\nfatal error: too many errors emitted, stopping now [-ferror-limit=]\n20 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/jordan/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)\ngyp ERR! stack     at emitTwo (events.js:126:13)\ngyp ERR! stack     at ChildProcess.emit (events.js:214:7)\ngyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)\ngyp ERR! System Darwin 19.2.0\ngyp ERR! command \\"/Users/jordan/.nvm/versions/node/v8.10.0/bin/node\\" \\"/Users/jordan/.nvm/versions/node/v8.10.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\\" \\"rebuild\\"\ngyp ERR! cwd /Users/jordan/Desktop/RnDiffApp/node_modules/fsevents\ngyp ERR! node -v v8.10.0\ngyp ERR! node-gyp -v v3.8.0\ngyp ERR! not ok"\n
Run Code Online (Sandbox Code Playgroud)\n\n

React-native 信息

\n\n
 React Native Environment Info:\n    System:\n      OS: macOS 10.15.2\n      CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\n      Memory: 48.09 MB / 16.00 GB\n      Shell: 2.6.0 - /usr/local/bin/fish\n    Binaries:\n      Node: 10.15.2 - ~/.nvm/versions/node/v10.15.2/bin/node\n      Yarn: 1.22.0 - ~/.nvm/versions/node/v10.15.2/bin/yarn\n      npm: 6.4.1 - ~/.nvm/versions/node/v10.15.2/bin/npm\n    SDKs:\n      iOS SDK:\n        Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1\n      Android SDK:\n        API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29\n        Build Tools: 23.0.1, 26.0.3, 28.0.2, 28.0.3\n    IDEs:\n      Android Studio: 3.5 AI-191.8026.42.35.5977832\n      Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild\n    npmPackages:\n      react: 16.6.1 => 16.6.1\n      react-native: 0.57.5 => 0.57.5\n    npmGlobalPackages:\n      react-native-cli: 2.0.1\n
Run Code Online (Sandbox Code Playgroud)\n