Skip to content

Instantly share code, notes, and snippets.

@ZHocean123
Last active February 18, 2019 09:44
Show Gist options
  • Select an option

  • Save ZHocean123/623f84b85183df36f8f1c881a7912f43 to your computer and use it in GitHub Desktop.

Select an option

Save ZHocean123/623f84b85183df36f8f1c881a7912f43 to your computer and use it in GitHub Desktop.
react-native问题记录
  1. node: command not found

    Oh, yeah sorry that's probably because when you run /bin/sh from your terminal it's picking up the PATH from the parent shell, which allows node to work.

    Different approach then, try (from your usual terminal where node is working):

    ln -s $(which node) /usr/local/bin/node

    That should put a symlink to node somewhere in the PATH that sh uses. If it already exists, I'm stumped.

    参考

  2. /node_modules/react-native/scripts/third-party/glog-0.3.5/test-driver'. Couldn't follow symbolic link.

    unlink node_modules/react-native/third-party/glog-0.3.5/test-driver
    

    或者

    rm -rf node_modules/react-native/scripts/third-party/glog-0.3.5/
    

    参考1,参考2

  3. Xcode 10: Build input file double-conversion cannot be found

    I was facing a similar issue after upgrading. To solve it I ran the following commands:

    $ cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../
    $ cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh && cd ../../../../

    如果没有以上文件,先执行react-native run-ios,再执行以上命令

    参考

  4. android Duplicate resources

    For those who are doing this before generating apk

    react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

    it generate unnecessary drawable images in drawable folder. so make sure to remove it and try again.

    android-> app -> src -> main -> res -> drawable

    参考

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment