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

时间:2022-05-17 20:52:38

I updated my React-Native from 0.15.0 to 0.18.1 and it's giving the following error now. (When trying with react-native start)

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

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)

What is the fix for this?

有什么办法解决这个问题?

2 个解决方案

#1


0  

Try this:

  1. rm -rf node_modules/
  2. rm -rf node_modules /

  3. npm i
  4. npm i fbjs
  5. npm i fbjs

  6. find . -name 'fbjs' -print
  7. 找 。 -name'fbjs'-print

  8. delete all but the top-level fbjs
  9. 删除除*fbj之外的所有内容

  10. rm -rf $TMPDIR/react-*
  11. rm -rf $ TMPDIR / react- *

  12. watchman watch-del-all
  13. npm cache clean
  14. npm缓存干净

I had the same issue after upgrading to version .18.1, this fixed if for me.

升级到版本.18.1之后我遇到了同样的问题,这对我来说是固定的。

#2


0  

Have you tried deleting your node_modules folder then reinstalling using npm install?

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

#1


0  

Try this:

  1. rm -rf node_modules/
  2. rm -rf node_modules /

  3. npm i
  4. npm i fbjs
  5. npm i fbjs

  6. find . -name 'fbjs' -print
  7. 找 。 -name'fbjs'-print

  8. delete all but the top-level fbjs
  9. 删除除*fbj之外的所有内容

  10. rm -rf $TMPDIR/react-*
  11. rm -rf $ TMPDIR / react- *

  12. watchman watch-del-all
  13. npm cache clean
  14. npm缓存干净

I had the same issue after upgrading to version .18.1, this fixed if for me.

升级到版本.18.1之后我遇到了同样的问题,这对我来说是固定的。

#2


0  

Have you tried deleting your node_modules folder then reinstalling using npm install?

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