这是控制台日志,您有什么建议可以从这里采取行动吗?
Loading dependency graph...
React packager ready.
jest-haste-map: <strong i="10">@providesModule</strong> naming collision:
Duplicate module name: react-native
Paths: /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/package.json collides with /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native-router-flux/node_modules/react-native/package.json
This warning is caused by a <strong i="11">@providesModule</strong> declaration with the same name across two different files.
Failed to build DependencyGraph: <strong i="12">@providesModule</strong> naming collision:
Duplicate module name: react-native-vector-icons
Paths: /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native-router-flux/node_modules/react-native/local-cli/core/__fixtures__/files/package.json
This error is caused by a <strong i="13">@providesModule</strong> declaration with the same name across two different files.
Error: <strong i="14">@providesModule</strong> naming collision:
Duplicate module name: react-native-vector-icons
Paths: /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native-router-flux/node_modules/react-native/local-cli/core/__fixtures__/files/package.json
This error is caused by a <strong i="15">@providesModule</strong> declaration with the same name across two different files.
at HasteMap._updateHasteMap (/Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:159:13)
at p.getName.then.name (/Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:134:31)
~
Process terminated. Press <enter> to close the window
同样的问题,如果您回滚到以前的版本,它会起作用:
yarn add [email protected]
如果你开始一个新的RN项目,你最好使用React Navigation
RN .43 使用 React 16.0 Alpha,而 react-native-router-flux 使用 React 15.5。
任何解决方法?
@sporteman使用此解决方法:
"react": "16.0.0-alpha.6",
"react-addons-pure-render-mixin": "15.5.2",
"react-native": "0.43.3",
"react-native-router-flux": "3.38.0",
"react-static-container": "^1.0.1",
完美的! 它就像一个魅力! 非常感谢@diegorodriguesvieira
恢复到“react-native-router-flux”:“3.38.0”,对我有用。 谢谢@diegorodriguesvieira
@diegorodriguesvieira非常感谢!!
你是如何找到这个解决方案的?
同样的问题,需要使用 3.38.0 版才能正常工作。
我有同样的问题,但我按照以下步骤解决了:
npm i
命令安装。npm i [email protected] --save
npm cache clean
命令。我可以按照这些步骤在 react-native-router-flux 项目中工作示例项目。我希望这对您有所帮助。
@dcolin在 react-native 等方面非常新,我们正在构建一个生产应用程序 atm,使用 react-native-router-flux 和 redux。
navigator 是否成熟到可以使用,你能做和 redux 一样的事情吗?
beta 7 RN 会给你同样的问题。 如果您使用的是最新版本的 React,则需要使用 beta 8。
@yasemincidem谢谢 - 您的建议有效
如果这些都没有帮助,您可以删除 node_modules/react-native-router-flux/node_modules/react-native 文件夹。
但这是解决这个问题的最糟糕的方法!
重新安装节点模块以解决其他问题,然后点击这个,现在回到另一个问题,使用 Pods 和 React-native..
:/
我认为不建议使用当前版本的 react-native-router-flux 和 RN .43,直到更稳定的 react-native-router-flux 版本出来
+1
如果您使用的是@provides NameOfModule,您现在应该切换到@providesModule
https://github.com/facebook/react-native/releases/tag/v0.44.0
@iegik我使用了0.44.0
。
[email protected]
上仍然存在错误
我只是降级到[email protected]
,它就像一个魅力。
顺便说一句,我在相机组件上遇到了类似的问题,并且在它向我展示的每个版本上,我都突然在 podfile 上添加了一个全局平台: platform :ios, '9.0'
如果解决了我的所有问题,除了[email protected]
我将测试其他 ios 版本,看看它是否与3.38.1
兼容
知道下一个版本的 react-native-router-flux 什么时候出来吗? @andkhong
这仍然是 react-native-router-flux v0.39.1 和 react-native v0.43.3 的问题
@hafizali05有效...
从以下路径中删除 react-native:
项目名称 > node_modules > react-native-router-flux > node_modules > react-native
有效......但这应该是固定的......
+1
+1
仍然有问题
“反应原生”:“0.44.2”
"react-native-router-flux": "3.39.2"
+1
删除所有 node_modules 并再次运行。
删除所有 node_modules 并再次运行对我不起作用但是
rm -r node_modules/react-native-video/node_modules/react-native-windows/ 工作
@diegorodriguesvieira
对不起,nooby 在这里......你如何实施你的工作?
回到那天,我用 bash 创建了一个启动脚本,以删除包中 react_native 的重复声明。 我已经升级到最新版本(强烈推荐),尽管解决冲突需要 2 周时间,但非常值得。
启动脚本有点像......(在router-flux中检查node_modules的路径)
纱线安装 && rm -rf ./node_modules/react-native-router-flux/node_modules/react-native
如果我在 react-native-router-flux 中没有 node_modules 文件夹怎么办?
在 node_modules/ 中查找重复的包,并在包中查找嵌套的 node_modules。
我遇到了问题 - 在本地开发模块时 - 必须删除像react
、 react-native
和react-navigation
。
最有用的评论
同样的问题,如果您回滚到以前的版本,它会起作用:
yarn add [email protected]