question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provider is undefined

See original GitHub issue

Hello every one ! I had a problem with redux : I create a simple application with this tutorial : https://medium.com/@jonlebensold/getting-started-with-react-native-redux-2b01408c0053#.ridphemkc

But it’s impossible to my to import Provider from react-redux 😦 I did : import {Provider} from 'react-redux' But Provider is undefined and it result in this exception when I try to use it :

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

Any idea ?

Here is the version of my packages : “react”: “15.4.2”, “react-native”: “0.42.0”, “react-redux”: “^5.0.3”, “redux”: “^3.6.0”, “redux-logger”: “^2.8.2”, “redux-thunk”: “^2.2.0”

Thanks in advance !

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
arsenalol69commented, Mar 21, 2017

I found a solution : instead of import { Provider } from 'react-redux', I write : import { Provider } from 'react-redux/src' and it works 😄 Explication : I checked inside the react-redux’s nodemodule folder and the export command was inside the src folder…

1reaction
lloydbankscommented, Dec 1, 2020

In case if you’re coming from google and using TypeScript, you should also install types for react-redux: npm install @types/react-redux

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: "Encountered undefined provider! Usually this means ...
Uncaught Error: Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files.
Read more >
Help! Provider aliases no longer working since .14 - Terraform
In terraform 0.14.x, our setup is as below, and we don't get this “provider aws is undefined warning” – only when upgrading to...
Read more >
ContactsContract.PhoneticNameStyle.Undefined Field
Learn more about the undefined in the Android.Provider namespace.
Read more >
Error: Encountered undefined provider! - Ionic Forum
Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files.
Read more >
provider as 'undefined' when using JsonRpcProvider inside of ...
I can confirm that Alchemy api is getting hits but provider is setting as undefined. go-ethereum · metamask · nodejs · ethers.js ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found