React-native-router-flux: インストールされているreact-nativeの重複バージョン

作成日 2017年04月20日  ·  40コメント  ·  ソース: aksonov/react-native-router-flux

react-native-router-flux v3.38.1
react-native v0.42.3

ヤーンのインストールにより、react-nativev0.42.3とreact-nativev0.41.1がインストールされます

react-native-router-fluxのpeerDependencyとしてreactおよびreact-nativeをインストールする必要がありますか?

再現するには:

react-native init {projectName} --version = 0.42.3
cd {projectName}
ヤーンはreact-native-router-fluxを追加します
npm start

君は見るべきだ

Failed to build DependencyGraph: <strong i="15">@providesModule</strong> naming collision:
  Duplicate module name: react-animated
  Paths: /Users/bdewitt/sandbox/break/node_modules/react-native-router-flux/node_modules/react-native/Libraries/Animated/release/package.json collides with /Users/bdewitt/sandbox/break/node_modules/react-native/Libraries/Animated/release/package.json

This error is caused by a <strong i="16">@providesModule</strong> declaration with the same name across two different files.
Error: <strong i="17">@providesModule</strong> naming collision:
  Duplicate module name: react-animated
  Paths: /Users/bdewitt/sandbox/break/node_modules/react-native-router-flux/node_modules/react-native/Libraries/Animated/release/package.json collides with /Users/bdewitt/sandbox/break/node_modules/react-native/Libraries/Animated/release/package.json

This error is caused by a <strong i="18">@providesModule</strong> declaration with the same name across two different files.
    at HasteMap._updateHasteMap (/Users/bdewitt/sandbox/break/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:158:13)
    at p.getName.then.name (/Users/bdewitt/sandbox/break/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:133:31)

ヤーンは[email protected]を追加します

成功するはず

最も参考になるコメント

これも大破しました。 3.38.0へのロールバックで修正

watchman watch-del-all
rm -rf node_modules && npm install
npm uninstall react-native-router-flux
npm install --save [email protected]
rm -fr $TMPDIR/react-*
npm cache clean
npm start -- --reset-cache

全てのコメント40件

同じ問題を投稿するためにここに来ました、それがこのコミットの依存関係に誤って追加されたようです: https ://github.com/aksonov/react-native-router-flux/commit/34e2d7ac7eb09489c2fd7f19844bd38e27e969fc

代わりにpeerDependencyとしてリストする必要があると思います

私はこの問題について髪を引き裂いてきました、問題の根本に出くわしてうれしいです

jest-haste-map: <strong i="6">@providesModule</strong> naming collision:
  Duplicate module name: react-native
  Paths: /Users/${username}/Desktop/${appName}/node_modules/react-native-router-flux/node_modules/react-native/package.json collides with /Users/${username}/Desktop/${appName}/node_modules/react-native/package.json

This warning is caused by a <strong i="7">@providesModule</strong> declaration with the same name across two different files.
Failed to build DependencyGraph: <strong i="8">@providesModule</strong> naming collision:
  Duplicate module name: react-native-vector-icons
  Paths: /Users/${username}/Desktop/${appName}/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/${username}/Desktop/${appName}/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="9">@providesModule</strong> declaration with the same name across two different files.
Error: <strong i="10">@providesModule</strong> naming collision:
  Duplicate module name: react-native-vector-icons
  Paths: /Users/${username}/Desktop/${appName}/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/${username}/Desktop/${appName}/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="11">@providesModule</strong> declaration with the same name across two different files.
    at HasteMap._updateHasteMap (/Users/${username}/Desktop/${appName}/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:158:13)
    at p.getName.then.name (/Users/${username}/Desktop/${appName}/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:133:31)

package.jsonからreact-native-router-fluxを削除し、node_modulesを再インストールしてもエラーは発生しないため、間違いなくreact-native-router-fluxです。

同じ問題

ここでも同じです、パッケージを更新してください

ええ、これは私の日も破壊しています。 簡単な回避策として、react-native-router-flux内のnode_modulesフォルダーからreact-nativeの複製を削除するだけです。 醜いですが、少なくとも当面は稼働状態になります

+1

今のところ3.38.0を再インストールします
npm install --save [email protected]

それは私が信じる糸とは関係ありません。 npmでインストールしても同じ問題が発生するためです。 node_modulesフォルダーを削除してnpmキャッシュをクリアしましたが、問題は解決しませんでした。 現在、GitHubの問題について読んだ回避策を進めました。この問題では、 node_modules / react-native-router-flux / node_modules / react-nativeパッケージを削除する必要があります。 彼らがこの問題をすぐに修正することを願っています。

こっちも一緒

修正を待って、 react-native-router-flux @ 3.30.1にロールバックします

こっちも一緒

これも大破しました。 3.38.0へのロールバックで修正

watchman watch-del-all
rm -rf node_modules && npm install
npm uninstall react-native-router-flux
npm install --save [email protected]
rm -fr $TMPDIR/react-*
npm cache clean
npm start -- --reset-cache

私も同じように、react-native-router-flux内のreact-nativeディレクトリを手動で削除して機能させる必要がありました。

はい、ロールバックするか、手動でフォルダを削除してください。回避策に感謝します。

次のリリースで問題が解決されることを願っています。

同じ問題、修正にご協力ください

3.38.0にロールバックすると、問題が修正されました。どうもありがとうございました。

ここでも同じですが、3.38.0に戻って修正しました。 ありがとう!

+1

ありがとう!

シャンパンを用意します!

同じ問題、3.38.0へのロールバックを解決

v0.38.0にロールバックするか、react -native-router-flux / node_modules /内のreact-nativeフォルダーを削除し、react -native-router-flux / node_modules / .bin /内のreact-nativeへのsymlinkも削除します。今。

便利なコピー&ペーストのために上記を投稿😄

watchman watch-del-all && rm -rf node_modules && npm install && npm uninstall react-native-router-flux && npm install --save [email protected] && rm -fr $TMPDIR/react-* && npm cache clean && npm start -- --reset-cache 

今立ち往生、ありがとう

+1

私のために働いたのはこのシーケンスでした:

ウォッチマンwatch-del-all
rm -rf node_modules && npm install
npmアンインストールreact-native-router-flux
npm install --save [email protected]
rm -fr $ TMPDIR / react- *
npmキャッシュクリーン
npm install --save [email protected]
npm start --- reset-cache

上記のすべての手順を試したところ、エラーは解消されましたが、ルーターはコンポーネントをレンダリングせず、シーンはコンポーネントをレンダリングしません。 それらが適切にフェッチされているかどうか、およびそれらがであるかどうかを再確認しました。 理由がわからない

コマンドラインの修正を試しましたが、これでビルドがエラーなしで機能するようになりましたが、jestを使用して単体テストを実行すると、react-native-router-fluxフォルダーにnode_moduleフォルダーが見つかりません。 jestはまだこれらのフォルダへの参照を取得しているようです:(
Jestの参照がどこから来たのか誰か知っていますか?
ENOENT: no such file or directory, stat '/{projectDirectory}/node_modules/react-native-router-flux/node_modules/react-native/Libraries/Core/ErrorUtils.js

@geecurveでも同じエラーが発生し、 npm cache cleanyarn cache cleanrm -rf node_modulesでさえも機能しませんでした。 元のプロジェクトディレクトリが死んでいたことがわかったので、小さなケースで新しいディレクトリを作成しました。 yarn installを実行し、プロジェクトをビルドしてテストする準備が整いました。

@prtkkmrsngh / node_modules / react-native-router-flux内のreact-nativeフォルダーを削除しましたか? またはreact-native-router-flux 3.38.0に戻しますか?

@ MattyK14は3.38.0に戻り、RNを0.44にアップグレードしました

@nazaslaterは、バージョンを「react-native-router-flux」に修正します:「3.38.0」、3.38.1

ありがとう@Tonacatecuhtli

1か月が経ちましたが、このバグを終わらせることができる小さな修正を行うチャンスはありますか?

@aksonovは問題を修正してください。 3.39.2

😥

@abdurrahmanekr @asokolこれをnpmに公開しても、最新のhttps://www.npmjs.com/package/react-native-router-fluxとして3.39.1が表示されます。

今は3.39.2です

このページは役に立ちましたか?
0 / 5 - 0 評価