react-native -问题统计

// 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';

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,362评论 5 477
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,330评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,247评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,560评论 1 273
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,580评论 5 365
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,569评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,929评论 3 395
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,587评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,840评论 1 297
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,596评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,678评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,366评论 4 318
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,945评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,929评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,165评论 1 259
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 43,271评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,403评论 2 342

推荐阅读更多精彩内容