JaneaSystems / nodejs-mobile-samples

Repository for demo applications that use Node.js on Mobile
MIT License
168 stars 111 forks source link

Unable to run it second time #15

Closed alexindigo closed 5 years ago

alexindigo commented 5 years ago

After I installed and started it successfully first time it was working as expected. But after I restarted the simulator and the app react-native run-ios, I started to get this error:

error: bundling failed: Error: jest-haste-map: @providesModule naming collision:
  Duplicate module name: streams-node
  Paths: /Users/alex/Projects/streams/nodejs-assets/nodejs-project/package.json collides with /Users/alex/Projects/streams/ios/build/Build/Products/Debug-iphonesimulator/streams.app/nodejs-project/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at setModule (/Users/alex/Projects/streams/node_modules/metro/node_modules/jest-haste-map/build/index.js:462:17)
    at workerReply (/Users/alex/Projects/streams/node_modules/metro/node_modules/jest-haste-map/build/index.js:512:9)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Not sure what I can do about it, besides changing package.json name every time I restarted the app.

Thank you.