2017-09-24 59 views
0

我按照this lesson反应本地运行IOS不工作

Versions are: 
    npm 5.4.2 
    homebrew 1.3.3 
    react-native-cli: 2.0.1 
    react-native: 0.48.4 
    watchman 4.9.0 
    node v6.6.0 

过程中我已经跑了命令:

[email protected]  ~/Documents/ReactNativeLearning  react-native init albums 
This will walk you through creating a new React Native project in /Users/admin/Documents/ReactNativeLearning/albums 
Using yarn v1.0.2 
Installing react-native... 
yarn add v1.0.2 
info No lockfile found. 
[1/4] Resolving packages... 
warning [email protected]: connect 2.x series is deprecated 
[2/4] Fetching packages... 
[3/4] Linking dependencies... 
warning "[email protected]" has unmet peer dependency "[email protected]". 
[4/4] Building fresh packages... 
success Saved lockfile. 
success Saved 496 new dependencies. 

✨ Done in 25.56s. 
dyld: lazy symbol binding failed: Symbol not found: _node_module_register 
    Referenced from: /Users/admin/node_modules/bufferutil/build/Release/bufferutil.node 
    Expected in: flat namespace 

dyld: Symbol not found: _node_module_register 
    Referenced from: /Users/admin/node_modules/bufferutil/build/Release/bufferutil.node 
    Expected in: flat namespace 

[1] 12606 abort  react-native init albums 
✘ [email protected]  ~/Documents/ReactNativeLearning  react-native run-ios 
Command `run-ios` unrecognized. Make sure that you have run `npm install` and that you are inside a react-native project. 
✘ [email protected]  ~/Documents/ReactNativeLearning  cd albums 
[email protected]  ~/Documents/ReactNativeLearning/albums  react-native run-ios 
dyld: lazy symbol binding failed: Symbol not found: _node_module_register 
    Referenced from: /Users/admin/node_modules/bufferutil/build/Release/bufferutil.node 
    Expected in: flat namespace 

dyld: Symbol not found: _node_module_register 
    Referenced from: /Users/admin/node_modules/bufferutil/build/Release/bufferutil.node 
    Expected in: flat namespace 

[1] 12632 abort  react-native run-ios 

回答

0

尝试做在你的项目文件夹中的npm install然后做react-native run-ios

+0

试了一下检查了这一点:https://gist.githubusercontent.com/anonymous/6ab41a6fc3499030fcf228ef34317c35/raw/8628a9bb7e27f053ce0398dabb99e49e1dc16db7/gistfile1.txt –

+0

这是你第一次使用初始化反应本地CLI兄弟的一个项目? –

+0

如果这是第一次,可能'''react-native''' cli安装不正确。尝试卸载,然后再次安装cli。 –

0

我得到它的工作原来,我使用的是不同版本的节点(v6.6.0)。所以我安装了nvm,并升级了我的节点。现在它工作了!

另外我尝试使用create-react-native-app而不是react-native init。出现了同样的问题。一定要更新所有必要的工具并检查您的节点版本。

相关问题