react-native -問題統(tǒng)計(jì)

// 001

為什么用npm安裝的時(shí)候所有的都會出現(xiàn)下面這樣的警告信息案缤鸣奔??雀监? 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. 這個(gè)問題要怎么解決镜豹?
npm init -f // 補(bǔ)齊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.reibang.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

因?yàn)檠b多個(gè)xocde導(dǎo)致
命令行解決鏈接: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

執(zhí)行 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’
執(zhí)行:
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的端口一樣時(shí)候一樣的

// 015

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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末例诀,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子裁着,更是在濱河造成了極大的恐慌繁涂,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,858評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件二驰,死亡現(xiàn)場離奇詭異扔罪,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)桶雀,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,372評論 3 395
  • 文/潘曉璐 我一進(jìn)店門矿酵,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人矗积,你說我怎么就攤上這事全肮。” “怎么了棘捣?”我有些...
    開封第一講書人閱讀 165,282評論 0 356
  • 文/不壞的土叔 我叫張陵辜腺,是天一觀的道長。 經(jīng)常有香客問我乍恐,道長评疗,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,842評論 1 295
  • 正文 為了忘掉前任茵烈,我火速辦了婚禮百匆,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘呜投。我一直安慰自己胧华,他們只是感情好寄症,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,857評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著矩动,像睡著了一般。 火紅的嫁衣襯著肌膚如雪释漆。 梳的紋絲不亂的頭發(fā)上悲没,一...
    開封第一講書人閱讀 51,679評論 1 305
  • 那天,我揣著相機(jī)與錄音男图,去河邊找鬼示姿。 笑死,一個(gè)胖子當(dāng)著我的面吹牛逊笆,可吹牛的內(nèi)容都是我干的栈戳。 我是一名探鬼主播,決...
    沈念sama閱讀 40,406評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼难裆,長吁一口氣:“原來是場噩夢啊……” “哼子檀!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起乃戈,我...
    開封第一講書人閱讀 39,311評論 0 276
  • 序言:老撾萬榮一對情侶失蹤褂痰,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后症虑,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體缩歪,經(jīng)...
    沈念sama閱讀 45,767評論 1 315
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,945評論 3 336
  • 正文 我和宋清朗相戀三年谍憔,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了匪蝙。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 40,090評論 1 350
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡习贫,死狀恐怖逛球,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情沈条,我是刑警寧澤需忿,帶...
    沈念sama閱讀 35,785評論 5 346
  • 正文 年R本政府宣布,位于F島的核電站蜡歹,受9級特大地震影響屋厘,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜月而,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,420評論 3 331
  • 文/蒙蒙 一汗洒、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧父款,春花似錦溢谤、人聲如沸瞻凤。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,988評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽阀参。三九已至,卻和暖如春瞻坝,著一層夾襖步出監(jiān)牢的瞬間蛛壳,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,101評論 1 271
  • 我被黑心中介騙來泰國打工所刀, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留衙荐,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 48,298評論 3 372
  • 正文 我出身青樓浮创,卻偏偏與公主長得像忧吟,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個(gè)殘疾皇子斩披,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,033評論 2 355

推薦閱讀更多精彩內(nèi)容