IjzerenHein / react-native-bundle-visualizer

See what packages are increasing your react-native bundle size 📦
MIT License
1.44k stars 42 forks source link

Receiving error regarding react-hot-loader #14

Closed gprocell927 closed 5 years ago

gprocell927 commented 5 years ago

Hi! I wanted to try running this, but I run into an error Can't resolve 'react-hot-loader' in '/Users/gabi/project_name/node_modules/react-timer-mixin' when I run yarn run react-native-bundle-visualizer.

I tried uninstalling and reinstalling my node modules, and my current node version is 11.10.0. React native version 0.57.8

Any suggestions? 😅 Thanks in advance!

IjzerenHein commented 5 years ago

Hmm, no idea to be honest. Most of the time it's an issue with the haul bundler. Could you check whether your project builds with haul and or not, and what errors you are getting?

gprocell927 commented 5 years ago

@ljzerenHein (thanks for the response!), the project isn't building with haul and the only error I was getting was the one that would say Can't resolve 'react-hot-loader' when I would try to run yarn run react-native-bundle-visualizer. Afterward, it would just stop running altogether. 🤔

IjzerenHein commented 5 years ago

Do you have react-hot-loader in your babelrc?

gprocell927 commented 5 years ago

We don't have a babelrc file or react-hot-loader. We're just using a babel.cofig.js file.

So I guess I should look into those as well? 🤔

IjzerenHein commented 5 years ago

What are you using the babel.config.js file for? Can you share its contents here?

radeno commented 5 years ago

@gprocell927 i got same issues even with haul. You need to add react-dom and react-hot-loader to devDependencies

radeno commented 5 years ago

Same issue here https://github.com/callstack/haul/issues/508 looks like it is not fixed yet

amed commented 5 years ago

Same issue here, BUT what is noticeable is , the hot reloading issue is related to a dir level above.

Field 'browser' doesn't contain a valid alias configuration
             /Users/amed/mobile/node_modules/react-hot-loader.js doesn't exist
         /Users/amed/node_modules/react-hot-loader doesn't exist
       .ios.js
IjzerenHein commented 5 years ago

Hi, I've released a new version which fixes the issue regarding the react-hot-loader. It basically installs these two dependencies, which are apparently needed by Haul. Also, it adds support for transpilation of the new @react-native-community libs, which are shipped as flow-code and therefore require transpilation. https://github.com/IjzerenHein/react-native-bundle-visualizer/releases/tag/v1.4.1