Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watchman causes errors when using with react-native #1953

Closed
yndc opened this issue Jul 9, 2017 · 2 comments
Closed

Watchman causes errors when using with react-native #1953

yndc opened this issue Jul 9, 2017 · 2 comments

Comments

@yndc
Copy link

yndc commented Jul 9, 2017

Hello!

I don't know if this belongs in relay or react-native repository, but here goes.
I'm on Windows 10 64-bit, my project setup are currently a fresh installation of Create React Native Application with react-relay.

Relay compiler requires watchman to be available on PATH windows environment, so I put the watchman.exe in my C:\windows\ and got the compiler running smoothly after doing this.

But react-native packager broke down if there is watchman.exe, here's the error log in the packager :

***ERROR STARTING PACKAGER***

jest-haste-map: @providesModule naming collision:
  Duplicate module name: isPromise
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/isPromise.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/isPromise.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: recycleNodesInto
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/recycleNodesInto.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/recycleNodesInto.js

This warning is caused by a @providesModule declaration with the same name across two different files.
***ERROR STARTING PACKAGER***

jest-haste-map: @providesModule naming collision:
  Duplicate module name: RelayError
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/RelayError.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/RelayError.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: RelayDefaultHandleKey
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/RelayDefaultHandleKey.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/RelayDefaultHandleKey.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: isCompatibleRelayFragmentType
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/isCompatibleRelayFragmentType.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/isCompatibleRelayFragmentType.js

This warning is caused by a @providesModule declaration with the same name across two different files.
***ERROR STARTING PACKAGER***

jest-haste-map: @providesModule naming collision:
  Duplicate module name: getRelayHandleKey
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/getRelayHandleKey.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/getRelayHandleKey.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: formatStorageKey
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/formatStorageKey.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/formatStorageKey.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: isScalarAndEqual
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/isScalarAndEqual.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/isScalarAndEqual.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: deepFreeze
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/deepFreeze.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/deepFreeze.js

This warning is caused by a @providesModule declaration with the same name across two different files.
***ERROR STARTING PACKAGER***

jest-haste-map: @providesModule naming collision:
  Duplicate module name: dedent
  Paths: C:/xampp/www/mis-client-mobile\node_modules/relay-compiler/lib/dedent.js collides with C:/xampp/www/mis-client-mobile\node_modules/relay-runtime/lib/dedent.js

This warning is caused by a @providesModule declaration with the same name across two different files.
***ERROR STARTING PACKAGER***

jest-haste-map: @providesModule naming collision:
  Duplicate module name: StaticContainer.react
  Paths: C:/xampp/www/mis-client-mobile\node_modules/react-static-container/lib/StaticContainer.react.js collides with C:/xampp/www/mis-client-mobile\node_modules/react-native/Libraries/Components/StaticContainer.react.js

This warning is caused by a @providesModule declaration with the same name across two different files.
***ERROR STARTING PACKAGER***

jest-haste-map: @providesModule naming collision:
  Duplicate module name: EventSubscription
  Paths: C:/xampp/www/mis-client-mobile\node_modules/fbemitter/lib/EventSubscription.js collides with C:/xampp/www/mis-client-mobile\node_modules/react-native/Libraries/EventEmitter/EventSubscription.js

This warning is caused by a @providesModule declaration with the same name across two different files.
***ERROR STARTING PACKAGER***

jest-haste-map: @providesModule naming collision:
  Duplicate module name: EmitterSubscription
  Paths: C:/xampp/www/mis-client-mobile\node_modules/fbemitter/lib/EmitterSubscription.js collides with C:/xampp/www/mis-client-mobile\node_modules/react-native/Libraries/EventEmitter/EmitterSubscription.js

This warning is caused by a @providesModule declaration with the same name across two different files.
***ERROR STARTING PACKAGER***

jest-haste-map: @providesModule naming collision:
  Duplicate module name: EventSubscriptionVendor
  Paths: C:/xampp/www/mis-client-mobile\node_modules/fbemitter/lib/EventSubscriptionVendor.js collides with C:/xampp/www/mis-client-mobile\node_modules/react-native/Libraries/EventEmitter/EventSubscriptionVendor.js

This warning is caused by a @providesModule declaration with the same name across two different files.
Packager started!

Resulting the packager unable to build and bundle the JS files.

This react-native packager error is solved by deleting the watchman.exe in C:\\windows\ and running
npm start -- --clear-cache
to start the packager.

But then when I need to compile the GraphQL, I have to put the watchman.exe back and this loop continues.

So yeah actually I got this working but I believe this is not the intended behaviour. Is there any mistake in my environment or installation procedure?

Thanks.

@yndc yndc changed the title Watchman dependency conflict with react-native Watchman causes errors when using with react-native Jul 9, 2017
@Igor-Senshov
Copy link

Hi,

Same problem with watchman on Windows 10, although I encounter them in jest. As I get it the problem comes from slashes. @FURIBAITO check this facebook/watchman#479, maybe it will help.

@leebyron
Copy link
Contributor

In the meantime, you can pass --watchman=false to disable it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants