IjzerenHein / react-native-bundle-visualizer

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

Doesn't work - RN 50.3 #12

Closed Frexuz closed 5 years ago

Frexuz commented 5 years ago
yarn run react-native-bundle-visualizer
yarn run v1.3.2
$ /Users/xxx/www/zzz/node_modules/.bin/react-native-bundle-visualizer
The file /Users/xxx/www/zzz/stats.html does not exist.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

It doesn't seem to run the compilation step?

haul seems to be correctly installed in /node_modules and /bin

react-native-bundle-visualizer@^1.3.0:
  version "1.3.0"
  resolved "https://registry.yarnpkg.com/react-native-bundle-visualizer/-/react-native-bundle-visualizer-1.3.0.tgz#82690f9e233a46c0e245fb71a0374949e52d1fe2"
  dependencies:
    babel-loader "^7.1.4"
    haul "^1.0.0-rc.4"
    webpack-visualizer-plugin "^0.1.11"
IjzerenHein commented 5 years ago

Hmm, I have no idea what's going on at the moment. I'm trying to get haul going on a fresh RN project, but it's just not doing anything when I type yarn haul init. It seems every haul command I run just returns error-code 0 (succes) but doesn't execute anything.

To be continued..

IjzerenHein commented 5 years ago

Okay I have located and resolved the problem. Apparently the latest haul bundler is only compatible with RN57 and beyond. I've just publish 2 new versions to deal with the incompatibility issues. The readme now contains a matrix of which version to install. In your case please install the 1.3.5 version.

RN version Install react-native-bundle-visualizer
>= 0.57 yarn add --dev react-native-bundle-visualizer
0.49 - 0.56 yarn add --dev react-native-bundle-visualizer@1.3.5
<= 0.48 yarn add --dev react-native-bundle-visualizer@1.1.0

cheers

Frexuz commented 5 years ago

Thanks. Actually upgraded to 0.57 :) But I'm sure many haven't!