当我打开xcode项目并尝试从本地包运行时(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如果我在发布或调试构建配置中运行,错误仍然存在。并且在模拟器和设备上都会发生。基本上我只能在AppDelegate.m配置为选项1(从dev server加载)的情况下运行示例应用程序,当我想要发布我的应用程序时,它不会运行。
我尝试了node 5.8和6.1。还有谁能想到调试的下一步?这只是一个基本的示例应用程序,它应该从本地包运行,对吗?
"dependencies": { "react": "^0.14.8", "react-native": "^0.25.1" }我用的是苹果电脑,还没试过安卓,但iOS肯定不能用。
发布于 2016-05-22 01:22:09
我在一台新机器上重新开始,一切都在新机器上运行得很好。所以很明显在我的旧机器上有一些问题,我发现提到全局安装Babel的CLI会导致像我看到的那样时髦的问题。情况可能就是这样,尽管在我卸载了Babel之后,它仍然存在。
我的建议是,如果你开始遇到这个问题,不要浪费一周的时间来解决它。重新加载您的操作系统并重新开始。
https://stackoverflow.com/questions/37256524
复制相似问题