IjzerenHein / react-native-bundle-visualizer

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

Compilation fails #2

Closed maraujop closed 6 years ago

maraujop commented 6 years ago

Hi Hein,

Compilation fails without any error message to debug:

captura de pantalla 2017-10-17 a las 9 58 49

Thanks, cheers Miguel

maraujop commented 6 years ago

BTW, I forgot to mention, that this happens also in a new react-native project created from scratch with RN 0.49.3

IjzerenHein commented 6 years ago

What version of node are you using?

p3drosola commented 6 years ago

I'm getting the same error with node 8.2.1 and react-native 0.49.3

IjzerenHein commented 6 years ago

Yikes. I have no idea what could be wrong there tbh. I'm pretty sure it's an error when haul is trying to bundle the code. I've just updated react-native-bundle-visualizer (to v1.1.0) to use the latest version of Haul. Could you try installing that? If that doesn't help, please follow the instructions on the haul site (yarn run haul init) and run yarn run haul bundle --platform ios. Also, haul creates a debug file (haul-debug.log) which may contain useful logs. Please dump that here.

p3drosola commented 6 years ago

I've pulled the latest from github https://github.com/IjzerenHein/react-native-bundle-visualizer/commit/27b9270822f6c0f1797f40b57ae651f69c6ae5ee and I'm still getting the same error.

A plain haul bundle works fine.

./node_modules/.bin/haul bundle --verbose --prod --platform ios

But when I pass in the config file it fails, and doesn't print anything to the haul-debug.log ./node_modules/.bin/haul bundle --verbose --prod --platform ios --config ./node_modules/react-native-bundle-visualizer/src/webpack.haul.js

So I guess it's something in the config file or the visualizer plugin.

p3drosola commented 6 years ago

Ok I found the issue. Seems like RN moved to a single index.js entry point, and the webpack config is assuming platform specific entry points.

https://github.com/facebook/react-native/releases/tag/v0.49.0

IjzerenHein commented 6 years ago

Ah of course. I read about it in the release notes but am still on .48 myself. I will see to it that this gets fixed. Thanks for finding the problem @p3drosola 👍

IjzerenHein commented 6 years ago

Hi, I've just released v1.20, it now works with react-native@0.49.x