Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createRef is not a function #8

Closed
ICanDoAllThingThroughChrist opened this issue Mar 15, 2020 · 2 comments · Fixed by #9

Comments

@ICanDoAllThingThroughChrist

new Application
src/index.js:10
7 | class Application extends React.Component {
8 | mapRef = React.createRef();
9 |

10 | constructor(props: Props) {
11 | super(props);
12 | this.state = {
13 | lng: 5,
View compiled
▶ 18 stack frames were collapsed.
Object../src/index.js
src/index.js:54
51 | }
52 | }
53 |
54 | ReactDOM.render(, document.getElementById('app'));
55 |
56 |
57 |
View compiled
▶ 6 stack frames were collapsed.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.

@tc33133
Copy link

tc33133 commented Mar 20, 2020

I was having same issue and changed the react and react-dom versions in the package.json from 15.5 to 16.4. Deleted the package-lock.json and the node_modules directory, then ran npm install and app is working correctly

@tristen tristen mentioned this issue Mar 20, 2020
@tristen
Copy link
Member

tristen commented Mar 20, 2020

Thanks for reporting @ICanDoAllThingThroughChrist and mentioning what worked for you @tc33133. I have a PR here that updates those versions 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants