运行 React Native 入门项目 (iOS) 时出现 TransformError [英] TransformError when running React Native Getting Started project (iOS)

查看:50
本文介绍了运行 React Native 入门项目 (iOS) 时出现 TransformError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法运行 React Native 入门项目.

我遵循了本指南:

解决方案

遇到了同样的问题.我有一个 ~/.babelrc 把一切都搞砸了.我尝试了所有我能找到的

  1. rm -rf node_modules
  2. npm 缓存清理
  3. 更改了节点版本
  4. npm install

最后……我的解决方案是:

sudo lsof -n -i4TCP:8081然后终止进程并重新运行 react-native run-ios

I'm having trouble getting the React Native Getting Started project to run.

I followed this guide: https://facebook.github.io/react-native/docs/getting-started.html

When I try to run the project from Xcode, the packager gets to " transform" then an error appears in the simulator.

TransformError: /Users/alexandertworowsky/Projects/AwesomeProject/node_modules/react-native/packager/react-packager/src/DependencyResolver/polyfills/prelude_dev.js: Unknown plugin "node-env-inline"

Here are my versions:

OS X Yosemite 10.10.1
Node 4.2.1
Xcode 6.4
React Native 0.12.0

解决方案

Had this same problem. I had a ~/.babelrc that was mucking everything up. I tried everything I could find

  1. rm -rf node_modules
  2. npm cache clean
  3. changed versions of node
  4. npm install

Finally... the solution for me was:

sudo lsof -n -i4TCP:8081 then kill the process and rerun react-native run-ios

这篇关于运行 React Native 入门项目 (iOS) 时出现 TransformError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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