gaearon / gaearon/react-hot-loader

It pops up error "node_modules/react-hot-loader/index.js didn't return a function" after upgrading react to 16.x and react-hot-loader to 4.x

Open
#1,411 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.2k
Forks
775
PR merge metrics
No merged PRs in 30d

Description

I have to upgrade React to 16.x from 15.x due to some requirements. However, an error pops up `“module not found : Error: Cannot resolve module 'react/lib/ReactMount' ”`. I solved this by upgrading `react-hot-loader` from 1.x to 4.x as old version relies on ReactMount that can't be found in new version. Unfortunately, a new error which I mention in title pops up afterwards. Been googling for a while, can't find a proper solution on it.

![image](https://user-images.githubusercontent.com/5180511/71950332-c5a55100-3211-11ea-96ae-a6bc69acf8ad.png)

Anyone met the same thing?

Contributor guide

Open the contributing guide

Research direction

No source file or test is identified in the issue. Reproduce the reported upgrade from React 15.x to 16.x and react-hot-loader 1.x to 4.x, then use the ReactMount resolution error and the “didn't return a function” error as the acceptance checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
developer-experience, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.