Closed karltaylor closed 7 years ago
What version did you npm install? You can check using npm ls react-redux-firebase
(can you copy the output here or attach a screenshot)?
Also, what did you specify in your package.json
for version or react-redux-firebase
? What is your loader config look like (assuming you are using Webpack)?
Seems like it might be a loader issue since react-redux-firebase
does not use async
that I am aware of.
getting this with
react-redux-firebase@1.4.0-rc.2
Although i'm also using: react@16.0.0-alpha.6
doing a little bit of digging it seems like it might be something to do with PropTypes being abstracted from the react library? Just a thought, haven't dug into the code too much.
Interesting thought @DavidBrear.
Have you tried older versions of react-redux-firebase (i.e. v1.3.4
or v1.4.0-rc.1
)? Usage of prop-types
within react-redux-firebase didn't start until v1.4.0-rc.2
.
Have you tried a v15 version of react
like 15.5.4
(latest) or v15.3.2
(used in all of the react-redux-firebase
examples)?
My guess is still that it is due to webpack loader parsing. If a reproduction repo can be provided or webpack loader config is provided, it would be easier to know.
Moving to v1.4.0-rc.1
fixed it. I've pulled down the source to see if I could make a PR to fix in rc.2
will try to get to it today.
@DavidBrear That would be great. This is one of the last things to get ironed out before the v1.4.0
release.
If we can't get it ironed out, we might have to go back to not using prop-types
(which will throw deprecation warnings for some)
v1.4.0-rc.3
has been released. It includes switching back to importing PropTypes
from react
instead of prop-types
(which has been moved to 1.5.0
within the roadmap).
@DavidBrear This means you should be able to use v1.4.0-rc.3
, let me know if you get a chance to check it out. If so, planning on releasing v1.4.0
from rc.3.
Note: Issue remaining open until this is out of pre-release
v1.4.0
has been released so this is now out of pre-release. prop-types
usage has been moved out to v1.5.0
.
Im still getting this error:
Building JavaScript bundle: error
Unable to resolve module `./factoryWithThrowingShims` from `/node_modules/react-redux-firebase/dist/react-redux-firebase.js`: Directory /node_modules/react-redux-firebase/dist/factoryWithThrowingShims doesn't exist
my version react-redux-firebase@1.5.0-alpha
@miketamis What is your webpack config? Are you using webpack 1 or 2?
Can anyone provide a repo where this can be reproduced?
Another theory:
It may have to due with prop-types
needing to be set as an external in the webpack config. This would make it so that prop-types
points to the one required by your project instead of being included in the bundle (means that prop-types
will instead of a peer dependency instead of dependency).
Again, can only be tested/confirmed if a repro is provided.
i have the same problem using react and react native
Yeap this error for me was with Expo. I fix it by putting the proptype repo into the react-redux-firebase dist folder in node_modules (obviously not a good fix)
@ricardokdz and @miketamis ok, going to try some stuff and hopefully get a alpha.2 version out soon that address this
@miketamis Does not work for me. How's your directory structure?
@ricardokdz The directory structure shouldn't be causing any issues. I have been using both the material example and the react-native examples to test.
Can you provide a repo that you are working on to reproduce the issue? For now I am just having to guess at things that might fix the issue.
@ricardokdz @miketamis @karltaylor What version of webpack are you using? Can you possibly post your webpack.config? If using webpack 2, how do your webpack configs compare to the webpack2 example?
I am able to use v1.5.0-alpha
with both webpack 1 and 2 with no issues.
It has come to my attention though that more often that not (seems like it is happening in your case) bundling libraries end up using the browser
field of package.json
if it is defined. In the case of react-redux-firebase, that points to the bundled/webpacked version (which may not be what you want if you are also using webpack).
If we can confirm that this is what is happening, I can release 1.5.0-alpha.2
with the only change being removal of the browser
field from the package file. That way, only the module version can be loaded (shouldn't cause dependency errors since it is not bundled).
v.1.5.0-alpha.2
was released without the browser
field within package.json
. This means that webpack should no longer point to the bundle (but instead the es5ified version).
@ricardokdz @miketamis and @karltaylor Please let me know if any of you get a chance to try this out or can provide a repository where I can reproduce the issue so the fix can be confirmed.
v1.5.0-beta
also does not include the browser
field, so it should respond the same way.
I have the same error, im using react-dom 16 and no other library
@stevematdavies This issue is from a while back and should be solved by being up to date. A few questions would help me get to the bottm of it faster:
react-redux-firebase
are you using?.babelrc
look like?generator-react-firebase
?https://webpack.js.org/configuration/externals/
try add prop-types library to external field.
@imdragonet Do you mean within react-redux-firebase
or in an application using it?
From what I thought (could be totally wrong), it was supposed to be a dependency handled by any library using it instead of a peer dependency. Open to doing that though if it some are still seeing this issue.
Can anyone help me on this?
error: bundling failed: Error: Unable to resolve module ./factoryWithThrowingShims
from /Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/react-advanced-form/lib/index.development.js
: The module ./factoryWithThrowingShims
could not be found from /Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/react-advanced-form/lib/index.development.js
. Indeed, none of these files exist:
/Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/react-advanced-form/lib/factoryWithThrowingShims(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)
/Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/react-advanced-form/lib/factoryWithThrowingShims/index(.native||.ios.js|.native.js|.js|.ios.json|.native.json|.json)
at ModuleResolver.resolveDependency (/Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:167:697)
at ResolutionRequest.resolveDependency (/Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:80:16)
at DependencyGraph.resolveDependency (/Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/metro/src/node-haste/DependencyGraph.js:237:485)
at Object.resolve (/Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/metro/src/lib/transformHelpers.js:116:25)
at dependencies.map.result (/Users/ubaidahmedawan/Desktop/Tabedaar/tabedaar/node_modules/metro/src/DeltaBundler/traverseDependencies.js:298:29)
at Array.map (
Just did a fresh npm install on a new project and imported into my project and got