美文网首页Hybrid开发
react-native -问题统计

react-native -问题统计

作者: GA_ | 来源:发表于2017-10-13 16:55 被阅读1281次
    // 001

    为什么用npm安装的时候所有的都会出现下面这样的警告信息啊??? npm WARN enoent ENOENT: no such file or directory, open 'D:\web\Imooc\package.json' npm WARN Imooc No description npm WARN Imooc No repository field. npm WARN Imooc No README data npm WARN Imooc No license field. 这个问题要怎么解决?
    npm init -f // 补齐package.json中缺失的键值对
    直接npm init -f,再install

    // 002

    Module JSTimersExecution is not a registered callabled module
    版本使用 "react-native": "0.46.4",
    Native module cannot be null

    // 003

    Undefined symbols for architecture x86_64:
    "_YGFlexDirectionToString", referenced from:
    _YGNodePrintInternal in Yoga.o
    "_YGJustifyToString", referenced from:
    _YGNodePrintInternal in Yoga.o
    "_YGEdgeToString", referenced from:
    _YGPrintEdges in Yoga.o
    "_YGOverflowToString", referenced from:
    _YGNodePrintInternal in Yoga.o
    "_YGAlignToString", referenced from:
    _YGNodePrintInternal in Yoga.o
    "_YGWrapToString", referenced from:
    _YGNodePrintInternal in Yoga.o
    "_YGDisplayToString", referenced from:
    _YGNodePrintInternal in Yoga.o
    "_YGPositionTypeToString", referenced from:
    _YGNodePrintInternal in Yoga.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    [图片上传中。。。(1)]

    // 004

    问题集锦
    http://www.jianshu.com/p/b182722df7a5

    // 005

    [!] Unable to find a specification for Folly (= 2016.09.26.00) depended upon by React/CxxBridge
    pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec’

    [!] Unable to find a specification for DoubleConversion depended upon by Folly
    pod 'DoubleConversion', :podspec => '../YE/RN/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'

    [!] Unable to find a specification for GLog depended upon by Folly
    pod 'GLog', :podspec => '../YE/RN/node_modules/react-native/third-party-podspecs/GLog.podspec’

    B797D704-E1B8-4A91-8078-D60CE0CB2B77.png
    // 006
    [!] /bin/bash -c
    set -e
    #!/bin/bash
    set -e
    
    PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
    CURRENT_ARCH="${CURRENT_ARCH:-armv7}"
    
    export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch     $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
    export CXX="$CC"
    
    # Remove automake symlink if it exists
    if [ -h "test-driver" ]; then
        rm test-driver
    fi
    
    ./configure --host arm-apple-darwin
    
    # Fix build for tvOS
    cat << EOF >> src/config.h
    
    /* Add in so we have Apple Target Conditionals */
    #ifdef __APPLE__
    #include <TargetConditionals.h>
    #include <Availability.h>
    #endif
    
    /* Special configuration for AppleTVOS */
    #if TARGET_OS_TV
    #undef HAVE_SYSCALL_H
    #undef HAVE_SYS_SYSCALL_H
    #undef OS_MACOSX
    #endif
    
    /* Special configuration for ucontext */
    #undef HAVE_UCONTEXT_H
    #undef PC_FROM_UCONTEXT
    #if defined(__x86_64__)
    #define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
    #elif defined(__i386__)
    #define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
    #endif
    EOF
    
    checking for a BSD-compatible install... /usr/local/bin/ginstall -c
    checking whether build environment is sane... yes
    checking for arm-apple-darwin-strip... no
    checking for strip... strip
    checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking for arm-apple-darwin-gcc...     
    /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot
    checking whether the C compiler works... no
    xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: SDK "iphoneos" cannot be located
    xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
    /Users/jianan/Library/Caches/CocoaPods/Pods/External/GLog/f09d6cdb8398b4922e87d51f5245de7e-3e4e4/missing: Unknown `--is-lightweight' option
    Try     `/Users/jianan/Library/Caches/CocoaPods/Pods/External/GLog/f09d6cdb8398b4922e87d51f5245de7e-3e4e4/missing --help' for more information
    configure: WARNING: 'missing' script is too old or missing
    configure: error: in `/Users/jianan/Library/Caches/CocoaPods/Pods/External/GLog/f09d6cdb8398b4922e87d51f5245de7e-3e4e4':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    

    因为装多个xocde导致
    命令行解决链接:https://www.bbsmax.com/A/lk5aEq1o51/
    或者
    打开xcode...

    12AABEC1-42F0-4214-978F-FBD3545D1A5C.png
    // 007

    Could not connect to development server.

    43591BD8-0B71-499A-83CD-DE0D937F57CE.png

    执行 npm start
    jianan:RN> npm start

    // 008

    Native module cannot be null.

    2AC04A0F-B682-4D91-A6B5-1AD8C61EB2A9.png
    解决办法:
    http://reactnative.cn/docs/0.49/linking-libraries-ios.html#content
    // 009

    'fishhook/fishhook.h' file not found
    .#import “fishhook.h”

    // 010

    undefined is not an object (evaludating ‘_react2_React.Component’)
    import React, {
    Component
    } from 'react’;

    // 011
    EE23705F-497B-4358-8E5C-087A619B5CC5.png
    Connection to http://127.0.0.1:8081/debugger-prox …….. if you have the right IP address in ‘RCTWebSocketExecutor.m’
    执行:
    npm start
    // 012
    FC5A4B06-F3D6-479D-83C7-CF65018B79FA.png

    Unable to resoleve module ‘./TabNavigatorView’ from ‘/User/……/index.ios.js’: could not resolve '/User/……/TabNavigatorView’ as a file nor as a folder

    // 013

    ERROR Packager can't listen on port 8081
    Loading dependency graph...npm ERR! code ELIFECYCLE
    npm ERR! errno 11
    npm ERR! YE@0.0.1 start: node node_modules/react-native/local-cli/cli.js start
    npm ERR! Exit status 11
    npm ERR!
    npm ERR! Failed at the YE@0.0.1 start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:
    npm ERR! /Users/jianan/.npm/_logs/2017-10-18T09_23_44_470Z-debug.log

    解决办法:
    react-native start --port=8080

    // 014

    Runtime is not ready for debugging.Make sure Packager server is running.

    68E40623-3FBA-4EA5-AF77-357D593BBAA1.png 173A0BB2-D372-41DE-AB5F-1A8634F9395D.png

    解决办法:
    RCTWebSocketExecutor.m 类中端口更改为和使用命令:react-native start --port=8080的端口一样时候一样的

    // 015

    StyleSheet is not defined
    import {
    StyleSheet,
    } from 'react-native';

    相关文章

      网友评论

        本文标题:react-native -问题统计

        本文链接:https://www.haomeiwen.com/subject/gjozyxtx.html