微信小程序转taro, yarn 的时候编译报错 taroConvert/node_modules/fsevents: Command failed.



  •  yarn
    yarn install v1.12.3
    warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
    [1/4] 🔍  Resolving packages...
    [2/4] 🚚  Fetching packages...
    [3/4] 🔗  Linking dependencies...
    warning "@tarojs/taro-rn > react-native-image-crop-picker@0.23.1" has unmet peer dependency "react-native@>=0.40.0".
    warning "@tarojs/taro-rn > react-native-image-zoom-viewer@2.2.27" has unmet peer dependency "react@*".
    warning "@tarojs/taro-rn > react-native-image-zoom-viewer@2.2.27" has unmet peer dependency "react-native@*".
    warning "@tarojs/taro-rn > react-native-root-toast@3.2.0" has unmet peer dependency "react-native@>=0.47.0".
    warning "@tarojs/taro-rn > react-native-image-zoom-viewer > react-native-image-pan-zoom@2.1.11" has unmet peer dependency "react@*".
    warning "@tarojs/taro-rn > react-native-image-zoom-viewer > react-native-image-pan-zoom@2.1.11" has unmet peer dependency "react-native@*".
    warning "@tarojs/taro-rn > react-native-unimodules > @unimodules/react-native-adapter@3.0.0" has unmet peer dependency "react-native@*".
    warning "@tarojs/mini-runner > babel-loader@8.0.6" has unmet peer dependency "@babel/core@^7.0.0".
    warning "@tarojs/mini-runner > stylus-loader@3.0.2" has unmet peer dependency "stylus@>=0.52.4".
    [4/4] 📃  Building fresh packages...
    [-/6] ⠈ waiting...
    [-/6] ⠈ waiting...
    [-/6] ⠈ waiting...
    [4/6] ⠈ fsevents
    warning Error running install script for optional dependency: "/Users/Jason/Desktop/yunxi/realty-serve-applet/taroConvert/node_modules/fsevents: Command failed.
    Exit code: 1
    Command: node-gyp rebuild
    Arguments:
    Directory: /Users/Jason/Desktop/yunxi/realty-serve-applet/taroConvert/node_modules/fsevents
    Output:
    gyp info it worked if it ends with ok
    gyp info using node-gyp@3.8.0
    gyp info using node@10.14.1 | darwin | x64
    gyp info spawn /usr/bin/python
    gyp info spawn args [ '/Users/Jason/.nvm/versions/node/v10.14.1/lib/node_modules/npm/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/Jason/Desktop/yunxi/realty-serve-applet/taroConvert/node_modules/fsevents/build/config.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/Users/Jason/.nvm/versions/node/v10.14.1/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/Users/Jason/.node-gyp/10.14.1/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/Jason/.node-gyp/10.14.1',
    gyp info spawn args   '-Dnode_gyp_dir=/Users/Jason/.nvm/versions/node/v10.14.1/lib/node_modules/npm/node_modules/node-gyp',
    gyp info spawn args   '-Dnode_lib_file=/Users/Jason/.node-gyp/10.14.1/<(target_arch)/node.lib',
    gyp info spawn args   '-Dmodule_root_dir=/Users/Jason/Desktop/yunxi/realty-serve-applet/taroConvert/node_modules/fsevents',
    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 spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
      SOLINK_MODULE(target) Release/.node
      CXX(target) Release/obj.target/fse/fsevents.o
    In file included from ../fsevents.cc:6:
    In file included from ../../nan/nan.h:53:
    In file included from /Users/Jason/.node-gyp/10.14.1/include/node/uv.h:62:
    In file included from /Users/Jason/.node-gyp/10.14.1/include/node/uv/unix.h:58:
    In file included from /Users/Jason/.node-gyp/10.14.1/include/node/uv/darwin.h:26:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/mach.h:67:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/mach_interface.h:42:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/mach/clock_priv.h:6:
    /usr/local/include/string.h:25:10: fatal error: 'plist/Node.h' file not found
    #include <plist/Node.h>
             ^~~~~~~~~~~~~~
    1 error generated.
    make: *** [Release/obj.target/fse/fsevents.o] Error 1
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/Users/Jason/.nvm/versions/node/v10.14.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
    gyp ERR! System Darwin 18.7.0
    gyp ERR! command \"/Users/Jason/.nvm/versions/node/v10.14.1/bin/node\" \"/Users/Jason/.nvm/versions/node/v10.14.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
    gyp ERR! cwd /Users/Jason/Desktop/yunxi/realty-serve-applet/taroConvert/node_modules/fsevents
    

    各系统版本号
    macOS:10.14.1
    node: 8.11.3
    npm:5.6.0
    taro:2.0.6


登录后回复