Fehler: Scherz-Eile-Karte: @providesModule Namensgebung Kollision, wenn eine lokale Abhängigkeit mit

stimmen
2

Ich verwende ein lokales Modul in package.jsondem auch hat react-nativeals Abhängigkeit.

In meiner APP package.json:

react: 16.4.1,
react-native: 0.56.0,
react-native-services: file:///Users/R01/Projects/react-native-services

In meinem react-native-services package.json:

react: 16.4.1,
react-native: 0.56.0

Also beim Laufen react-native run-androidder Metro Bündler wirft:

Looking for JS files in
   /Users/R01/Projects/RNApp
   /Users/R01/Projects/react-native-services 


Metro Bundler ready.

Loading dependency graph...(node:72824) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
  Duplicate module name: Sample
  Paths: /Users/R01/Projects/react-native-services/node_modules/react-native/Libraries/Sample/package.json collides with /Users/R01/Projects/RNApp/node_modules/react-native/Libraries/Sample/package.json

 This error is caused by a @providesModule declaration with the same name across two different files.
    at setModule (/Users/R01/Projects/RNApp/node_modules/jest-haste-map/build/index.js:446:17)
    at workerReply (/Users/R01/Projects/RNApp/node_modules/jest-haste-map/build/index.js:496:9)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)
(node:72824) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:72824) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
error: bundling failed: Error: jest-haste-map: @providesModule naming collision:
  Duplicate module name: Sample
  Paths: /Users/R01/Projects/react-native-services/node_modules/react-native/Libraries/Sample/package.json collides with /Users/R01/Projects/RNApp/node_modules/react-native/Libraries/Sample/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at setModule (/Users/R01/Projects/RNApp/node_modules/jest-haste-map/build/index.js:446:17)
    at workerReply (/Users/R01/Projects/RNApp/node_modules/jest-haste-map/build/index.js:496:9)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:182:7)

Ich habe es schon versucht:

  • Mit den beiden npmund yarn (aktualisierten) Installationen , sondern react-native run-androidwirft immer den gleichen Fehler.
  • Wächter-Uhr-del-all rm -rf node_modules && npm installieren rm -fr $ TMPDIR / lauten die Reaktionen * npm Cache sauber npm Start - --reset-Cache
Veröffentlicht am 20/10/2018 um 12:51
quelle vom benutzer
In anderen Sprachen...                            


2 antworten

stimmen
0

Ich reagiere mich.

Als vorübergehende Lösung, und in die Abhängigkeiten gegeben setzen peerDependenciesentweder nicht funktioniert hat , habe ich die setzen reactund react-nativein devDependenciesder react-native-servicesVerpackung.

Beantwortet am 20/10/2018 um 14:18
quelle vom benutzer

stimmen
0

Wächter - Uhr-del-all rm -rf node_modules && npm installieren rm -fr $ TMPDIR / lauten die Reaktionen * npm Cache sauber npm Start - --reset-Cache für hier mehr Besuche

Beantwortet am 20/10/2018 um 13:09
quelle vom benutzer

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more