在React Native Update之后,Packager将无法启动

时间:2016-01-27 04:15:05

标签: react-native

我将我的React-Native从0.15.0更新为0.18.1,现在它给出了以下错误。 (尝试react-native start时)

Error building DependencyGraph:
 Error: Naming collision detected: /Users/mymac/research/react-native/rotater/ios-templates/node_modules/fbjs/lib/warning.js collides with /Users/mymac/research/react-native/rotater/ios-templates/node_modules/react-native/node_modules/fbjs/lib/warning.js
    at HasteMap._updateHasteMap (HasteMap.js:132:13)
    at HasteMap.js:103:28
    at tryCallOne (/Users/mymac/research/react-native/rotater/ios-templates/node_modules/promise/lib/core.js:37:12)
    at /Users/mymac/research/react-native/rotater/ios-templates/node_modules/promise/lib/core.js:103:15
    at flush (/Users/mymac/research/react-native/rotater/ios-templates/node_modules/asap/raw.js:50:29)
    at doNTCallback0 (node.js:428:9)
    at process._tickCallback (node.js:357:13)

对此有什么解决方法?

2 个答案:

答案 0 :(得分:0)

您是否尝试删除node_modules文件夹,然后使用npm install重新安装?

答案 1 :(得分:0)

试试这个:

  1. var server2_method1 = Meteor.wrapAsync(function(param1, param2, callback) { server2.call('server2_method1', param1, param2, function(err, result){ callback(err, result); }); });
  2. rm -rf node_modules/
  3. npm i
  4. npm i fbjs
  5. 删除除顶级fbjs以外的所有内容
  6. find . -name 'fbjs' -print
  7. rm -rf $TMPDIR/react-*
  8. watchman watch-del-all
  9. 升级到.18.1版后我遇到了同样的问题,这对我来说是固定的。