【发布时间】:2016-09-12 09:31:20
【问题描述】:
当我打开 xcode 项目并尝试运行时,浏览 react-native 教程(安装先决条件,然后安装“react-native init AwesomeProject”和“react-native run-ios”,在模拟器中运行良好)从本地包(AppDelegate.m 中的选项 2)我收到以下错误:
/Users/webb/projects/nativeapp/fuel/node_modules/node-haste/lib/index.js:331
Object.assign(DependencyGraph, {
^
TypeError: Object.assign is not a function
at Object.<anonymous> (/Users/webb/projects/nativeapp/fuel/node_modules/node-haste/lib/index.js:331:8)
at Module._compile (module.js:430:26)
at Module._extensions..js (module.js:448:10)
at Object.require.extensions.(anonymous function) [as .js] (/Users/webb/projects/nativeapp/fuel/node_modules/babel-register/lib/node.js:166:7)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (index.js:16:30)
at Module._compile (module.js:430:26)
Command /bin/sh failed with exit code 1
如果我在发布或调试构建配置中运行,错误仍然存在。并且发生在模拟器和设备上。几乎我只能运行配置为选项 1(从开发服务器加载)的 AppDelegate.m 的示例应用程序,当我想发布我的应用程序时它不会运行。
我尝试了节点 5.8 和 6.1。其他人能想到调试的下一步吗?这只是基本示例应用程序,它应该从本地包中运行,对吧?
"dependencies": {
"react": "^0.14.8",
"react-native": "^0.25.1"
}
我在mac上,没试过android,但iOS肯定不能用。
【问题讨论】:
-
React Native 0.26 昨天发布了,它也有同样的问题。没有人从捆绑包中运行这些示例应用程序吗?
标签: ios iphone xcode react-native