Comments (9)
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:
- It's CI cache
- 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.
Sure! Submit a PR and i'll take a look.
from react-native-mock.
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.
May be related to #58 as well
from react-native-mock.
Out of curiosity, @ColCh Does npm shrinkwrap
fail, citing node-haste
as a problem?
from react-native-mock.
@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.
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.
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.
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)
- React v15.5.0 Deprecation Warnings HOT 3
- Need a way to reset _animationFrame count HOT 2
- Mock for i18nManager HOT 3
- Missing support for percentage widths HOT 1
- Does it support mock fetch? HOT 3
- Invariant Violation: Native module cannot be null. HOT 6
- TypeError: Cannot read property 'number' of undefined HOT 23
- Cannot find module 'react/lib/ReactComponentTreeHook' from 'ReactDebugTool.js' HOT 35
- not able to install from npm HOT 6
- Plans to support FlatList HOT 1
- Should `babel-preset-airbnb` be in `dependencies`? HOT 1
- Warning: ReactTestUtils has been moved to react-dom/test-utils HOT 1
- Issue using via package manager since build is required HOT 6
- View.PropTypes is depricated but still used here. HOT 2
- emitting event from native ios working example
- Animated Delay is not exported HOT 1
- Animated is not fully mocked
- No wiki page now HOT 1
- Cannot find module 'ReactPerf' from 'react-native.js'
- Maintainers wanted HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-mock.