Giter VIP home page Giter VIP logo

Comments (9)

ColCh avatar ColCh commented on August 14, 2024 1

On build time.
This error happends if react-native-mock is remain in ./node_modules.
To succesfully build my app, I should remove this module by hand.

I'm forced to keep my devDeps and deps in same dir, because:

  1. It's CI cache
  2. because of npm bug: npm/npm#12654

Really, I can send you a PR which removes those @providesModule, it's not that hard. Just tell me, whether this module id is useful for you or not.

(I think, it's useless, in case of testing util, which is not used at build time)

from react-native-mock.

RealOrangeOne avatar RealOrangeOne commented on August 14, 2024 1

Sure! Submit a PR and i'll take a look.

from react-native-mock.

RealOrangeOne avatar RealOrangeOne commented on August 14, 2024

We aren't actually using node-haste in react-native-mock. At what point is this error occuring? At install time, package time, or test time?

from react-native-mock.

ColCh avatar ColCh commented on August 14, 2024

May be related to #58 as well

from react-native-mock.

AshCoolman avatar AshCoolman commented on August 14, 2024

Out of curiosity, @ColCh Does npm shrinkwrap fail, citing node-haste as a problem?

from react-native-mock.

ColCh avatar ColCh commented on August 14, 2024

@AshCoolman no.
We are using RN v0.26 (React v15.0) so I will check for RNM v0.2.2:

➜  PROJ git:(master) ✗ npm i -S [email protected]
- [email protected] node_modules/react-native-mock/node_modules/react-addons-test-utils
[email protected] /Users/ColCh/Documents/Workspace/PROJ
└─┬ [email protected] 
  ├── [email protected] 
  ├── [email protected] 
  ├── [email protected] 
  ├── [email protected] 
  └── [email protected] 

➜  PROJ git:(master) ✗ npm shrinkwrap                  
wrote npm-shrinkwrap.json

Works just fine.

But if I install [email protected] (for [email protected]), it will fail (of course):

➜  PROJ git:(master) ✗ npm shrinkwrap 
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/ColCh/.nvm/versions/node/v5.10.1/bin/node" "/Users/ColCh/.nvm/versions/node/v5.10.1/bin/npm" "shrinkwrap"
npm ERR! node v5.10.1
npm ERR! npm  v3.9.0

npm ERR! Problems were encountered
npm ERR! Please correct and try again.
npm ERR! peer invalid: react@^15.1.0, required by [email protected]
npm ERR! peer invalid: react@^15.1.0, required by [email protected]
npm ERR! peer invalid: react@^15.1.0, required by [email protected]
npm ERR! peer invalid: react@^15.1.0, required by [email protected]
npm ERR! peer invalid: react@^15.1.0, required by [email protected]
npm ERR! peer invalid: react@^15.1.0, required by [email protected]
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/ColCh/Documents/PROJ/npm-debug.log

from react-native-mock.

ColCh avatar ColCh commented on August 14, 2024

Hm, I realized that my meaning was wrong! I found no @providesModule.

And, see this log?

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: AutoFocusUtils
  Paths: /foo/node_modules/react-native-mock/node_modules/react/lib/AutoFocusUtils.js collides with /foo/node_modules/react/lib/AutoFocusUtils.js

react-native-mock/node_modules/react - that was the root of the trouble.

It's solving by moving away react dependency from package.json.
And it is already!
This commit bring this brilliant solution: 545b880

So, consider this particular case of doubled @providesModule directives solved!

That commit was introduced first in v0.2.2 of react-native-mock.

Hey, @RealOrangeOne, I will close this issue since it's resolved. Please take a look into #58 , may be it's about @providesModule too. And it's being resolved since v0.2.2

Thanks! 👍

from react-native-mock.

RealOrangeOne avatar RealOrangeOne commented on August 14, 2024

I guess one thing that could be done to improve this would be remove react as a dependancy, and specify the version needed in a peer dependancy. If i'm right, that should fix the problem?

from react-native-mock.

ColCh avatar ColCh commented on August 14, 2024

yes, it seems that error from node-haste was because of local react installation in react-native-mock/node_modules folder.

from react-native-mock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.