反应本地iOS部署错误 [英] React Native iOS Deployment Error

查看:154
本文介绍了反应本地iOS部署错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试将我的应用程序部署到手机进行测试时,出现以下错误。



Xcode Simulator中的应用程序功能,并能够导出到iPhone中进行测试。



运行npm后,开始发生以下错误。



而iPhone应用程序加载但计数未连接到开发服务器,因为无法启动npm。 >

是的,iPhone和我的电脑都在同一个无线网络上。

 ┌──────────────────────────────────────────────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── b│在任何JS项目开发过程中,让包装商运行。感觉│
│免费关闭此选项卡,并运行您自己的包装器实例,如果│
│更喜欢。 │
││
│https://github.com/facebook/react-native│
││
└─────────── ────────────────────────────────────────────────── ──────────┘
寻找
/ Users / jimmylin / dev / ga / WalkingTour / SohoDuck

[10: 40:02 AM]<开始>建立依赖关系图
[10:40:02 AM]< START>爬网文件系统
[热模块更换]服务器侦听/热

反应包装准备就绪。

错误:未知选项--no-pretty

错误:未知选项--no-pretty

守望者:守望者 - 不漂亮get-sockname返回与退出代码1错误:未知选项--no-pretty

错误看门人 - 没有漂亮的get-sockname返回与退出代码1错误:未知选项--no-pretty

错误:watchman - no-pretty get-sockname返回与退出代码1 ERROR:未知选项--no-pretty

在ChildProcess。< anonymous> (/Users/jimmylin/dev/ga/WalkingTour/SohoDuck/node_modules/fb-watchman/index.js:198:18)
在emitTwo(events.js:100:13)
在ChildProcess。 emit(events.js:185:7)
在maybeClose(internal / child_process.js:850:16)
在Socket。< anonymous> (internal / child_process.js:323:11)
在emitOne(events.js:90:13)
在Socket.emit(events.js:182:7)
在Pipe。 _onclose(net.js:477:12)

有关常见问题和解决方案,请参阅http://facebook.github.io/react-native/docs/troubleshooting.html


npm ERR!达尔文15.3.0
npm ERR! argv/usr/local/Cellar/node/5.9.1/bin/node/ usr / local / bin / npmstart
npm ERR!节点v5.9.1
npm ERR! npm v3.7.3
npm ERR!代码ELIFECYCLE
npm ERR! SohoDuck@0.0.1 start:`node node_modules / react-native / local-cli / cli.js start`
npm ERR!退出状态1
npm ERR!
npm ERR!在SohoDuck@0.0.1启动脚本节点node_modules / react-native / local-cli / cli.js start'失败。
npm ERR!确保安装了最新版本的node.js和npm。
npm ERR!如果你这样做,这很可能是SohoDuck包的一个问题,
npm ERR!不是与npm本身。
npm ERR!告诉笔者,您的系统失败:
npm ERR!节点node_modules / react-native / local-cli / cli.js start
npm ERR!您可以获取有关如何为此项目打开问题的信息:
npm ERR! npm错误SohoDuck
npm ERR!或者如果不可用,您可以通过以下方式获取他们的信息:
npm ERR! npm所有者ls SohoDuck
npm ERR!以上可能还有其他日志输出。

npm ERR!请包含以下文件与任何支持请求:
npm ERR! /Users/jimmylin/dev/ga/WalkingTour/SohoDuck/npm-debug.log

任何建议将非常感谢。

解决方案

正确安装依赖项




  1. 卸载 watchman 流程通过 npm homebrew

  2. 安装 看门人 流程 仅通过自制软件



    brew install watchman

    brew install flow



The below error occurred while in attempt to deploy my app to the mobile phone for testing.

the app function in the Xcode Simulator, and was able to export to the app into iPhone for testing.

after running the npm start the following error occurred.

while the iPhone app did load but count not connect to development server due to not able to npm start.

And yes both the iPhone and my computer is on the same wireless network.

 ┌────────────────────────────────────────────────────────────────────────────┐ 
 │  Running packager on port 8081.                                            │ 
 │                                                                            │ 
 │  Keep this packager running while developing on any JS projects. Feel      │ 
 │  free to close this tab and run your own packager instance if you          │ 
 │  prefer.                                                                   │ 
 │                                                                            │ 
 │  https://github.com/facebook/react-native                                  │ 
 │                                                                            │ 
 └────────────────────────────────────────────────────────────────────────────┘ 
Looking for JS files in
   /Users/jimmylin/dev/ga/WalkingTour/SohoDuck 

[10:40:02 AM] <START> Building Dependency Graph
[10:40:02 AM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot

React packager ready.

ERROR: Unknown option --no-pretty

ERROR: Unknown option --no-pretty

Watchman:  watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty

 ERROR  watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty

Error: watchman--no-pretty get-sockname returned with exit code 1 ERROR: Unknown option --no-pretty

    at ChildProcess.<anonymous> (/Users/jimmylin/dev/ga/WalkingTour/SohoDuck/node_modules/fb-watchman/index.js:198:18)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:850:16)
    at Socket.<anonymous> (internal/child_process.js:323:11)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:477:12)

See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.

npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/Cellar/node/5.9.1/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v5.9.1
npm ERR! npm  v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! SohoDuck@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the SohoDuck@0.0.1 start script 'node node_modules/react-native/local-cli/cli.js start'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the SohoDuck package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/react-native/local-cli/cli.js start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs SohoDuck
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls SohoDuck
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jimmylin/dev/ga/WalkingTour/SohoDuck/npm-debug.log

any suggestion would be greatly appreciated.

解决方案

Correct installation of dependencies

  1. Uninstall watchman and flow via npm and homebrew
  2. Install watchman and flow only via homebrew

    brew install watchman
    brew install flow

这篇关于反应本地iOS部署错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆