Giter Site home page Giter Site logo

ijzerenhein / react-native-bundle-visualizer Goto Github PK

View Code? Open in Web Editor NEW
1.4K 10.0 41.0 5.03 MB

See what packages are increasing your react-native bundle size ๐Ÿ“ฆ

License: MIT License

JavaScript 13.30% Java 20.91% Ruby 2.45% Objective-C 15.16% Starlark 2.04% TypeScript 46.14%
react-native bundle-size bundle-visualizer expo

react-native-bundle-visualizer's Introduction

react-native-bundle-visualizer

See what's inside of your react-native bundle ๐Ÿ“ฆ

bundle-visualizer-animation

Uses the awesome source-map-explorer to visualize the output of the Metro bundler.

Purpose

Sometimes, importing a single javascript library can drastically increase your bundle size. This package helps you to identify such a library, so you can keep the bundle size low and loading times fast.

Usage

Make sure npx is installed and run the following command in your project root

npx react-native-bundle-visualizer

Or install as a dev-dependency

yarn add --dev react-native-bundle-visualizer

And run it:

yarn run react-native-bundle-visualizer

or when using npm:

npm install --save-dev react-native-bundle-visualizer ./node_modules/.bin/react-native-bundle-visualizer

Command line arguments

All command-line arguments are optional. By default a production build will be created for the ios platform.

Option Description Example
platform Platform to build (default is ios) --platform ios
dev Dev or production build (default is false) --dev false
entry-file Entry-file (when omitted tries to auto-resolve it) --entry-file ./index.ios.js
bundle-output Output bundle-file (default is tmp) --bundle-output ./myapp.bundle
format Output format html, json or tsv (default is html) (see source-map-explorer options) --format json
only-mapped Exclude "unmapped" bytes from the output (default is false). This will result in total counts less than the file size. --only-mapped
verbose Dumps additional output to the console (default is false) --verbose
reset-cache Removes cached react-native files (default is false) --reset-cache
--expo Set this to true/ false based on whether using expo or not. For eg, set --expo true when using expo. Not required to pass this for react-native cli. (default is false) --expo false

Use react-native-bundle-visualizer@2 when targetting Expo SDK 40 or lower.

Version compatibility

Version Comments
3.x Compatible with React-Native CLI bootstrapped projects and Expo SDK 41 or higher.
2.x Compatible with React-Native CLI bootstrapped projects and Expo SDK 40 or earlier.
1.x Uses the Haul bundler instead instead of the Metro output.

License

MIT

react-native-bundle-visualizer's People

Contributors

dependabot[bot] avatar evanbacon avatar hurali97 avatar ijzerenhein avatar ofir-oron avatar omerg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-bundle-visualizer's Issues

Support running using npx

It should not be required to save as a dev dependency.

This should work: npx react-native-bundle-visualizer

But it gives: /Users/me/.npm/_npx/83500/bin/react-native-bundle-visualizer: line 9: ./node_modules/.bin/haul: No such file or directory

Support Create-React-Native-App

This module using hard-code entry-point: ./index.js. CRNA using:

./node_modules/react-native-scripts/build/bin/crna-entry.js

To fix this issues, I will open a PR allow to read main field from package.json instead of hard-code.

Accept metro bundler config as an argument.

Proposed change:

Accept a --config argument & pass it on to react native bundle command.

Example usage -
react-native-bundle-visualizer --platform android --config metro+esbuild.config.js

Why is this needed:
It'll be easier to view bundle sizes when testing out different configurations of metro config.

Ex:: Bundling with es-build /without es-build.

How to configure this so it actually works?

Hi,

I'm trying visualize my app bundle (duh) and followed your instructions of npm install --save-dev react-native-bundle-visualizer and then ./node_modules/.bin/react-native-bundle-visualizer for my React Native (0.59.10) app.

Unfortunately, all that happens is that I get about a kazillion errors instead of a result, although my project runs fine on both iOS and Android. The terminal output doesn't really help me figure out what's going on since it's about 80.000 lines long (yeah, it's quite a huge project).

My .babelrc file looks like this:

{
  "presets": ["module:metro-react-native-babel-preset"],
  "env": {
    "production": {
      "plugins": [ ["transform-remove-console", { "exclude": [ "error", "warn"] }] ]
    }
  }  
}

Any ideas what's going on here? Thanks.

Mapping whole computer

I've used yarn run react-native-bundle-visualizer inside the project's folder, but it logged the entire computer.

Screenshot 2020-09-03 at 19 13 04

Cannot read property `pipe` of undefined

npx react-native-bundle-visualizer


npx: installed 80 in 3.004s
Generating bundle...
React-native binary could not be located. Please report this issue with environment info to:
 -> [object Object]
Cannot read property 'pipe' of undefined
(node:94064) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "file" argument must be of type string. Received undefined
    at validateString (internal/validators.js:124:11)
    at normalizeSpawnArguments (child_process.js:411:3)
    at Object.spawn (child_process.js:551:13)
    at execa (/Users/fernandorojo/.npm/_npx/94064/lib/node_modules/react-native-bundle-visualizer/node_modules/execa/index.js:83:26)
    at Object.<anonymous> (/Users/fernandorojo/.npm/_npx/94064/lib/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js:114:23)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:94064) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:94064) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections th

Any idea what this might be? I'm using Expo SDK 43 in a monorepo. I'm running the command from apps/expo. I have react native 0.64.3.

Verbose gives size [object Object]

Steps to repro

I am running this line. I tried --verbose option for more visibility on numbers in cli.

react-native-bundle-visualizer --entry-file index.js --dev false --platform ios --bundle-output build/ios/main.jsbundle --verbose

With this, I was getting size field like this

---/node_modules/metro-config/node_modules/metro/src/lib/polyfills/require.js, size: [object Object] bytes
---/node_modules/react-native/Libraries/polyfills/console.js, size: [object Object] bytes
---/node_modules/react-native/Libraries/polyfills/error-guard.js, size: [object Object] bytes
---/node_modules/react-native/Libraries/polyfills/Object.es7.js, size: [object Object] bytes

Configuration

Package Version = [email protected] 
Node Version = 14.18.0
Npm Version = 6.14.15

Fix

I tried updating this line to console bundle.files[file].size instead and the output was presented correctly as expected.

I did not dive into why this happens or if I am able to get the same on a different node version. But just found something and thought I should let people know here.
I'll update here once I have some time to check on different node versions.

Clarification: How the size is calculated

I have installed this and get the size of my bundle and it shows 100% with the some 10 MB. How the calculation is done here?

How can I know the package exceeds a certain level? And in my window, it shows a unmapped as 40%.

Can anyone clarify the unmapped 40% will caluculated on what basis?

Getting error command failed.

Hey @IjzerenHein I am using RN-0.63. I am getting a few exceptions when running the command.
Command : ./node_modules/.bin/react-native-bundle-visualizer --verbose --platform android --dev true --entry-file ./index.js
Output:
Generating bundle... (node:11773) UnhandledPromiseRejectionWarning: TypeError: Command failed: ./node_modules/.bin/react-native bundle --platform android --dev true --entry-file ./index.js --bundle-output /tmp/react-native-bundle-visualizer/LearnRN/android.bundle --sourcemap-output /tmp/react-native-bundle-visualizer/LearnRN/android.bundle.map timedPromise.finally is not a function at setExitHandler (/home/neel/workspace/LearnRN/app/LearnRN/node_modules/react-native-bundle-visualizer/node_modules/execa/lib/kill.js:102:29) at execa (/home/neel/workspace/LearnRN/app/LearnRN/node_modules/react-native-bundle-visualizer/node_modules/execa/index.js:100:22) at Object.<anonymous> (/home/neel/workspace/LearnRN/app/LearnRN/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js:90:23) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) (node:11773) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) (node:11773) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Can you please let me know the solution for this.

Fails with collision warning on Expo 42 & AWS Amplify

On EXPO SDK42 project with with AWS-Amplify i get the below error

yarn run react-native-bundle-visualizer --expo managed
yarn run v1.22.4
$ C:\work\code\tadeeb\node_modules\.bin\react-native-bundle-visualizer --expo managed
Generating bundle...
                 Welcome to React Native!
                Learn once, write anywhere

Error: Duplicated files or mocks. Please check the console for more info
    at setModule (C:\work\code\tadeeb\node_modules\metro\node_modules\jest-haste-map\build\index.js:620:17) 
    at workerReply (C:\work\code\tadeeb\node_modules\metro\node_modules\jest-haste-map\build\index.js:691:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 25277)
(node:21552) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: ./node_modules/.bin/react-native bundle --platform ios --dev false --entry-file ./node_modules/expo/AppEntry.js --bundle-output C:\Users\hanan\AppData\Local\Temp\react-native-bundle-visualizer\tadeeb\ios.bundle --sourcemap-output C:\Users\hanan\AppData\Local\Temp\react-native-bundle-visualizer\tadeeb\ios.bundle.map --config C:\work\code\tadeeb\node_modules\react-native-bundle-visualizer\src\expo-metro.config.js
jest-haste-map: Haste module naming collision: tadeeb0bd7c964CustomMessage
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>\amplify\#current-cloud-backend\function\tadeeb0bd7c964CustomMessage\src\package.json
    * <rootDir>\amplify\backend\function\tadeeb0bd7c964CustomMessage\src\package.json

Failed to construct transformer:  DuplicateError: Duplicated files or mocks. Please check the console for more info
    at setModule (C:\work\code\tadeeb\node_modules\metro\node_modules\jest-haste-map\build\index.js:620:17)
    at workerReply (C:\work\code\tadeeb\node_modules\metro\node_modules\jest-haste-map\build\index.js:691:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 25277) {
  mockPath1: 'amplify\\#current-cloud-backend\\function\\tadeeb0bd7c964CustomMessage\\src\\package.json',
  mockPath2: 'amplify\\backend\\function\\tadeeb0bd7c964CustomMessage\\src\\package.json'
}
error Duplicated files or mocks. Please check the console for more info. Run CLI with --verbose flag for more details.
                 Welcome to React Native!
                Learn once, write anywhere


Error: Duplicated files or mocks. Please check the console for more info
    at setModule (C:\work\code\tadeeb\node_modules\metro\node_modules\jest-haste-map\build\index.js:620:17)
    at workerReply (C:\work\code\tadeeb\node_modules\metro\node_modules\jest-haste-map\build\index.js:691:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 25277)
    at makeError (C:\work\code\tadeeb\node_modules\react-native-bundle-visualizer\node_modules\execa\lib\error.js:60:11)
    at handlePromise (C:\work\code\tadeeb\node_modules\react-native-bundle-visualizer\node_modules\execa\index.js:118:26)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:21552) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:21552) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Done in 5.75s.
PS C:\work\code\tadeeb> 

On the amplify repo

amazon-archives/awsmobile-cli#172

They are suggesting to add a "rn-cli.config.js" with the below content

const blacklist = require('metro-config/src/defaults/blacklist');

module.exports = {
    resolver: {
        blacklistRE: blacklist([/#current-cloud-backend\/.*/]),
    },
};

But didnt fix the issue.. also added it in expo package.json

 "packagerOpts": {
            "config": "./rn-cli.config.js"
        },

But result still same.

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

This is a fix proposal to this issue #38

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v18.0.0

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js b/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js
index 6487b5c..5d1fb35 100755
--- a/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js
+++ b/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js
@@ -169,7 +169,7 @@ bundlePromise
       result.bundles.forEach((bundle) => {
         Object.keys(bundle.files).forEach((file) => {
           console.log(
-            chalk.green(file + ', size: ' + bundle.files[file] + ' bytes')
+            chalk.green(file + ', size: ' + bundle.files[file].size + ' bytes')
           );
         });
       });
@@ -188,4 +188,5 @@ bundlePromise
 
     // Open output file
     return open(bundleOutputExplorerFile);
-  });
+  })
+  .catch((error) => { });

This issue body was partially generated by patch-package.

Cannot run on windows

I am using Windows 10.

I have done installation by:
npm install --save-dev react-native-bundle-visualizer

And when I try to run the program using:
./node_modules/.bin/react-native-bundle-visualizer

I get the message:

The system cannot find the path specified.

If I try to run other programs in the same path, like:
.\node_modules\.bin\which
It is working properly.

Visualizer script fails when package name is scoped

I'm using v2. My RN app lives in a package within a monorepo, so the name field in the package.json is @org/appName. The script fails when trying to create the tmp directory because of the slash in the package name. I was able to run the script no problem by changing the package name, but it would be ideal if this package could accommodate this kind of package name.

Cannot find module 'core-js/modules/es7.string.pad-start'

yarn run react-native-bundle-visualizer

yarn run v0.23.4

$ "~/www/rn_app/node_modules/.bin/react-native-bundle-visualizer"
module.js:472
    throw err;
    ^

Error: Cannot find module 'core-js/modules/es7.string.pad-start'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/kristiangerardsson/www/flately.com/native_app/node_modules/haul/src/cli.js:10:1)
    at Module._compile (module.js:571:32)
    at loader (/Users/kristiangerardsson/www/flately.com/native_app/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/kristiangerardsson/www/flately.com/native_app/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
โœจ  Done in 1.01s.

failed to compile because of babel-loader

Hi, when I want to run, I get the error below
(node:25862) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead

ERROR Failed to compile.

./node_modules/haul/src/vendor/polyfills/String.prototype.es6.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
...............

what should I do?

Module parse failed: Unexpected token

I'm getting following error:

./node_modules/redux-persist-filesystem-storage/index.js 10:19
Module parse failed: Unexpected token (10:19)
You may need an appropriate loader to handle this file type.
|   storagePath: `${RNFetchBlob.fs.dirs.DocumentDir}/persistStore`,
|   encoding: 'utf8',
>   toFileName: (name: string) => name.split(':').join('-'),
|   fromFileName: (name: string) => name.split('-').join(':'),
| }
@ ./src/store/index.js 1:396-439
@ ./index.js

This is the line which it complains:
https://github.com/robwalkerco/redux-persist-filesystem-storage/blob/master/index.js#L10

Any idea how to fix this ?

I'm using:
node v8.11.4
react-native : ^0.59.4
react: ^16.8.6

Typescript support

Thanks for this great tool. My project is base on typescript, the react-native-bundle-visualizer command prompts lacking .js file and stopped. Any idea on how to support typescript?

No details?

Using latest version with latest version of RN (0.73.5) and the output contains no details for any of the tabs. Main section is blank.
visualizer

Module not found: Error: Can't resolve 'assets/image.png'

Some places I have this code: const image = require('assets/image.png')

It works just fine, but when trying to use this lib it gives this error:
Module not found: Error: Can't resolve 'assets/image.png'

Changing to relative path will probably fix it, but it shouldn't be necessary.

Support monorepo

Test project: https://github.com/brunolemos/react-native-web-monorepo

Output:

[16:38:39] brunolemos:react-native-web-monorepo git:(master) $ npx react-native-bundle-visualizer     
npx: installed 77 in 3.994s
Generating bundle...
Error: The resource `/Users/user/projects/react-native-web-monorepo/index.js` was not found.
    at /Users/user/projects/react-native-web-monorepo/node_modules/metro/src/IncrementalBundler.js:157:26
    at gotStat (fs.js:1676:21)
    at callback (/Users/user/projects/react-native-web-monorepo/node_modules/graceful-fs/polyfills.js:295:20)
    at FSReqCallback.oncomplete (fs.js:169:21)
(node:2927) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1 (EPERM): ./node_modules/.bin/react-native bundle --platform ios --dev false --entry-file ./index.js --bundle-output /var/folders/xh/gcxkb1qx2rd3fmqz5vxrs2lh0000gn/T/react-native-bundle-visualizer/myprojectname/ios.bundle --sourcemap-output /var/folders/xh/gcxkb1qx2rd3fmqz5vxrs2lh0000gn/T/react-native-bundle-visualizer/myprojectname/ios.bundle.map
    at makeError (/Users/user/.npm/_npx/2927/lib/node_modules/react-native-bundle-visualizer/node_modules/execa/lib/error.js:58:11)
    at handlePromise (/Users/user/.npm/_npx/2927/lib/node_modules/react-native-bundle-visualizer/node_modules/execa/index.js:112:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:2927) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2927) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[16:38:47] brunolemos:react-native-web-monorepo git:(master) $ cd packages/mobile 
[16:39:13] user:mobile git:(master) $ npx react-native-bundle-visualizer
npx: installed 77 in 4.218s
Generating bundle...
Error: The resource `/Users/user/projects/react-native-web-monorepo/index.js` was not found.
    at /Users/user/projects/react-native-web-monorepo/node_modules/metro/src/IncrementalBundler.js:157:26
    at gotStat (fs.js:1676:21)
    at callback (/Users/user/projects/react-native-web-monorepo/node_modules/graceful-fs/polyfills.js:295:20)
    at FSReqCallback.oncomplete (fs.js:169:21)
(node:2952) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1 (EPERM): ./node_modules/.bin/react-native bundle --platform ios --dev false --entry-file ./index.js --bundle-output /var/folders/xh/gcxkb1qx2rd3fmqz5vxrs2lh0000gn/T/react-native-bundle-visualizer/mobile/ios.bundle --sourcemap-output /var/folders/xh/gcxkb1qx2rd3fmqz5vxrs2lh0000gn/T/react-native-bundle-visualizer/mobile/ios.bundle.map
    at makeError (/Users/user/.npm/_npx/2952/lib/node_modules/react-native-bundle-visualizer/node_modules/execa/lib/error.js:58:11)
    at handlePromise (/Users/user/.npm/_npx/2952/lib/node_modules/react-native-bundle-visualizer/node_modules/execa/index.js:112:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:2952) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2952) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[16:39:20] user:mobile git:(master) $ 

Unable to map error

I was able to run a couple weeks ago but failed continuously today without any error.

yarn run v1.22.4
$ /Users/xxx/xxx/xxx-expense/node_modules/.bin/react-native-bundle-visualizer --expo managed
Generating bundle...
                 Welcome to React Native!
                Learn once, write anywhere


info Writing bundle output to:, /var/folders/y8/7lh919_s0j38nkv2btgd7dy00000gp/T/react-native-bundle-visualizer/UnknownApp/ios.bundle
info Writing sourcemap output to:, /var/folders/y8/7lh919_s0j38nkv2btgd7dy00000gp/T/react-native-bundle-visualizer/UnknownApp/ios.bundle.map
info Done writing bundle output
info Done writing sourcemap output
Bundle is 4.53 MB in size (unchanged since last run)
Unable to map 1287124/4750750 bytes (27.09%)
โœจ  Done in 40.78s.

compile error

Steps I followed:
npm install --save-dev react-native-bundle-visualizer
./node_modules/.bin/react-native-bundle-visualizer

resulting error:
./node_modules/.bin/react-native-bundle-visualizer: line 9: ./node_modules/.bin/haul: No such file or directory

node version: v8.10.0

Not working: Getting this error

Error running haul bundle --config ./node_modules/react-native-bundle-visualizer/src/webpack.haul.js --platform ios

TypeError: Invalid Version:
at new SemVer (/Users/300006350/workspace/rn-batbelt/node_modules/haul/node_modules/semver/semver.js:293:11)
at compare (/Users/300006350/workspace/rn-batbelt/node_modules/haul/node_modules/semver/semver.js:566:10)
at Function.gte (/Users/300006350/workspace/rn-batbelt/node_modules/haul/node_modules/semver/semver.js:615:10)
at getDefaultConfig (/Users/300006350/workspace/rn-batbelt/node_modules/haul/src/utils/makeReactNativeConfig.js:69:24)
at PLATFORMS.map.platform (/Users/300006350/workspace/rn-batbelt/node_modules/haul/src/utils/makeReactNativeConfig.js:215:34)
at Array.map ()
at makeReactNativeConfig (/Users/300006350/workspace/rn-batbelt/node_modules/haul/src/utils/makeReactNativeConfig.js:213:29)
at Object.bundle (/Users/300006350/workspace/rn-batbelt/node_modules/haul/src/commands/bundle.js:29:7)
at run (/Users/300006350/workspace/rn-batbelt/node_modules/haul/src/cliEntry.js:178:19)
at

Cannot find module 'expo-asset/tools/hashAssetFiles'

Hi,

I tried to use this tool on my Expo 36 project. I installed the package as a dev dependency but get the following error running yarn run react-native-bundle-visualizer --expo managed: Error: Cannot find module 'expo-asset/tools/hashAssetFiles'

I looked into the node_modules folder and expo-asset version 8.0.0 does not seem to contain the required file.

triggerUncaughtException with react-native 0.71.2

I'm trying to utilize bundle visualizer with the latest react-native and I'm running into this output:

$ yarn run visualizer:release
$ yarn workspace @monorepo/main run react-native-bundle-visualizer --dev=false
$ /Users/fcalise/code/myproject/node_modules/.bin/react-native-bundle-visualizer --dev=false
Generating bundle...
                Welcome to Metro v0.73.7
              Fast - Scalable - Integrated


info Writing bundle output to:, /var/folders/pl/1r8l1pts2r3c2hbcpdbq4ppc0000gn/T/react-native-bundle-visualizer/monorepomain/ios.bundle
info Writing sourcemap output to:, /var/folders/pl/1r8l1pts2r3c2hbcpdbq4ppc0000gn/T/react-native-bundle-visualizer/monorepomain/ios.bundle.map
info Done writing sourcemap output
info Done writing bundle output
Bundle is 2.74 MB in size (unchanged since last run)
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
  code: 'ERR_UNHANDLED_REJECTION'
}
error Command failed with exit code 1.

Any suggestions or would you like any other information attached? Open to trying patches and other solutions

Bundle size does not reflect App Store size

After running:

yarn run react-native-bundle-visualizer

I get this as output:

Bundle is 7.82 MB in size (unchanged since last run)
Unable to map 1252691/8196479 bytes (15.28%)

However, our app in the iOS app store is around 62 MB

Am I missing something? Is bundle size a different thing than the app size in the app store?

Compilation fails

Hi Hein,

Compilation fails without any error message to debug:

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

Thanks, cheers
Miguel

Source-map-explorer error

Hello,
Recently, we moved to yarn workspace monorepo although I'm not sure if this is happening because of it since I haven't used the library in some time.

There lib is generating the bundle and sourcemap, but it seems to be corrupted.

Generating bundle...
warning: the transform cache was reset.
                    Welcome to Metro!
              Fast - Scalable - Integrated


info Writing bundle output to:, /var/folders/z0/1fmtx0f56_z4f2mgch3tyfsm0000gn/T/react-native-bundle-visualizer/app/ios.bundle
info Writing sourcemap output to:, /var/folders/z0/1fmtx0f56_z4f2mgch3tyfsm0000gn/T/react-native-bundle-visualizer/app/ios.bundle.map
info Done writing bundle output
info Done writing sourcemap output
Bundle is 85.18 MB in size (unchanged since last run)
=== error === {
  bundles: [],
  errors: [
    {
      bundleName: '/var/folders/z0/1fmtx0f56_z4f2mgch3tyfsm0000gn/T/react-native-bundle-visualizer/app/ios.bundle',
      code: 'InvalidMappingLine',
      message: 'Your source map refers to generated line 17, but the source only contains 16 line(s).\n' +
        'Check that you are using the correct source map.',
      error: [AppError]
    }
  ]
}

Does not seem to work with Expo

I'm having trouble getting this to work in a RN project using Expo. I've been able to reproduce the error I'm seeing in a brand new Expo project so I think the issue happens in general.

Steps to reproduce:

  • Install the Expo CLI: npm install -g expo-cli
  • Create a new project: expo init bundlle-visualizer-expo-test. Choose the blank template.
  • cd into the new project and: yarn add --dev react-native-bundle-visualizer
  • Attempt to create the bundle: yarn run react-native-bundle-visualizer

Problem encountered:
I get the error below. It seems that the bundler can't find the AppEntry.js file included in Expo. Expo projects contain "main": "node_modules/expo/AppEntry.js", in package.json and this file is included in the Expo npm package.

multi ./node_modules/haul/src/vendor/polyfills/Object.es6.js ./node_modules/haul/src/vendor/polyfills/console.js ./node_modules/haul/src/vendor/polyfills/error-guard.js ./node_modules/haul/src/vendor/polyfills/Number.es6.js ./node_modules/haul/src/vendor/polyfills/String.prototype.es6.js ./node_modules/haul/src/vendor/polyfills/Array.prototype.es6.js ./node_modules/haul/src/vendor/polyfills/Array.es6.js ./node_modules/haul/src/vendor/polyfills/Object.es7.js ./node_modules/haul/src/vendor/polyfills/babelHelpers.js ./node_modules/react-native/Libraries/Core/InitializeCore.js node_modules/expo/AppEntry.js
Module not found: Error: Can't resolve 'node_modules/expo/AppEntry.js' in '/home/simon/projects/bundle-test'
resolve 'node_modules/expo/AppEntry.js' in '/home/simon/projects/bundle-test'
 Parsed request is a module
 using description file: /home/simon/projects/bundle-test/package.json (relative path: .)
   Field 'browser' doesn't contain a valid alias configuration
   resolve as module
     /home/simon/projects/node_modules doesn't exist or is not a directory
     /home/simon/node_modules doesn't exist or is not a directory
     /home/node_modules doesn't exist or is not a directory
     /node_modules doesn't exist or is not a directory
     looking for modules in /home/simon/projects/bundle-test/node_modules
       using description file: /home/simon/projects/bundle-test/package.json (relative path: ./node_modules)
         Field 'browser' doesn't contain a valid alias configuration
         using description file: /home/simon/projects/bundle-test/package.json (relative path: ./node_modules/node_modules/expo/AppEntry.js)
           no extension
             Field 'browser' doesn't contain a valid alias configuration
             /home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js doesn't exist
           .ios.js
             Field 'browser' doesn't contain a valid alias configuration
             /home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js.ios.js doesn't exist
           .native.js
             Field 'browser' doesn't contain a valid alias configuration
             /home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js.native.js doesn't exist
           .js
             Field 'browser' doesn't contain a valid alias configuration
             /home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js.js doesn't exist
           as directory
             /home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js doesn't exist
[/home/simon/projects/node_modules]
[/home/simon/node_modules]
[/home/node_modules]
[/node_modules]
[/home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js]
[/home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js.ios.js]
[/home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js.native.js]
[/home/simon/projects/bundle-test/node_modules/node_modules/expo/AppEntry.js.js]
@ multi ./node_modules/haul/src/vendor/polyfills/Object.es6.js ./node_modules/haul/src/vendor/polyfills/console.js ./node_modules/haul/src/vendor/polyfills/error-guard.js ./node_modules/haul/src/vendor/polyfills/Number.es6.js ./node_modules/haul/src/vendor/polyfills/String.prototype.es6.js ./node_modules/haul/src/vendor/polyfills/Array.prototype.es6.js ./node_modules/haul/src/vendor/polyfills/Array.es6.js ./node_modules/haul/src/vendor/polyfills/Object.es7.js ./node_modules/haul/src/vendor/polyfills/babelHelpers.js ./node_modules/react-native/Libraries/Core/InitializeCore.js node_modules/expo/AppEntry.js main[10]

Receiving error regarding react-hot-loader

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!

Pass existing bundle as argument

I would like to pass existing bundle and sourcemap as arguments, so I don't build JS bundle twice on CI.

npx react-native-bundle-visualizer --bundle-path index.android.bundle --source-maps index.android.bundle.map

This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

This is a fix proposal to this issue #38

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js b/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js
index 6487b5c..cf608f2 100755
--- a/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js
+++ b/node_modules/react-native-bundle-visualizer/src/react-native-bundle-visualizer.js
@@ -140,8 +140,8 @@ bundlePromise
       console.log(
         chalk.green.bold(
           'Bundle is ' +
-            Math.round((stats.size / (1024 * 1024)) * 100) / 100 +
-            ' MB in size'
+          Math.round((stats.size / (1024 * 1024)) * 100) / 100 +
+          ' MB in size'
         ) + deltaSuffix
       );
 
@@ -188,4 +188,5 @@ bundlePromise
 
     // Open output file
     return open(bundleOutputExplorerFile);
-  });
+  })
+  .catch((error) => { });

This issue body was partially generated by patch-package.

Doesn't work - RN 50.3

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"

Proposal of channel discussion

Hi, I took the liberty of creating a public chat in the discord facing React-Native. With the intention of uniting the React-native community and improving communication.

I'm creating a channel for public discussions about your project. To avoid flooding "chat" on your github. If you can support the initiative, great! Just share the link below xD

I'm adding RN only projects to this public chat service. And I commit myself to manage chat rooms.
You would just need to observe the chat related to your project.

here's the link
https://discord.gg/RvFM97v

Cheers.

Option to resolve path alias?

Error: Unable to resolve module @/auth/my.device.slice from

@ path alias is defined in tsconfig.json

  "compilerOptions": {
    ...
    "paths": {
      "@/*": ["src/*"]
    }

EXPO SDK 44: error Unable to resolve module ../../App from node_modules/expo/AppEntry.js:

Hi,

I keep getting this error when I run it on a EXPO SDK 44 project.

It is a JSX project


{
    "main": "node_modules/expo/AppEntry.js",
    "scripts": {
        "start": "expo start",
        "android": "expo start --android",
        "ios": "expo start --ios",
        "web": "expo start --web",
        "postinstall": "rndebugger-open --expo",
        "eject": "expo eject",
        "lint": "eslint --ext .js,.jsx src --color"
    },
    "dependencies": {
        "@expo/vector-icons": "^12.0.0",
        "@react-native-async-storage/async-storage": "~1.15.0",
        "@react-native-community/datetimepicker": "4.0.0",
        "@react-native-community/masked-view": "0.1.10",
        "@react-native-community/netinfo": "7.1.3",
        "@react-native-community/slider": "4.1.12",
        "@sentry/react-native": "^3.2.13",
        "@umalqura/core": "^0.0.7",
        "d3-scale": "1.0.7",
        "date-fns": "^2.11.0",
        "expo": "^44.0.0",
        "expo-app-loading": "~1.3.0",
        "expo-application": "~4.0.1",
        "expo-av": "~10.2.0",
        "expo-camera": "~12.1.0",
        "expo-constants": "~13.0.1",
        "expo-device": "~4.1.0",
        "expo-file-system": "~13.1.2",
        "expo-font": "~10.0.4",
        "expo-image-picker": "~12.0.1",
        "expo-linear-gradient": "~11.0.0",
        "expo-location": "~14.0.1",
        "expo-network": "~4.1.0",
        "expo-notifications": "~0.14.0",
        "expo-splash-screen": "~0.14.1",
        "expo-system-ui": "~1.1.0",
        "expo-updates": "~0.11.6",
        "firebase": "7.9.0",
        "formik": "^1.5.8",
        "lodash": "^4.17.19",
        "moment": "^2.24.0",
        "moment-duration-format": "^2.3.2",
        "react": "17.0.1",
        "react-dom": "17.0.1",
        "react-native": "0.64.3",
        "react-native-bundle-visualizer": "2.3.0",
        "react-native-calendar-heatmap": "^0.2.4",
        "react-native-calendar-strip": "^2.0.9",
        "react-native-chart-kit": "^5.6.1",
        "react-native-country-picker-modal": "^2.0.0",
        "react-native-elements": "^1.2.7",
        "react-native-gesture-handler": "~2.1.0",
        "react-native-gifted-chat": "^0.16.3",
        "react-native-keyboard-aware-scroll-view": "^0.9.1",
        "react-native-paper": "^3.6.0",
        "react-native-popup-menu": "^0.15.9",
        "react-native-reanimated": "~2.3.1",
        "react-native-root-siblings": "^4.0.6",
        "react-native-root-toast": "^3.2.1",
        "react-native-safe-area-context": "3.3.2",
        "react-native-screens": "~3.10.1",
        "react-native-segmented-control-tab": "^3.4.1",
        "react-native-simple-time-picker": "^0.2.0",
        "react-native-step-indicator": "^1.0.3",
        "react-native-svg": "12.1.1",
        "react-native-svg-charts": "^5.4.0",
        "react-native-swipeable-view-wrapper": "^0.1.2",
        "react-native-web": "~0.13.12",
        "react-native-webview": "11.15.0",
        "react-native-x-carousel": "^1.0.1",
        "react-navigation": "^4.4.0",
        "react-navigation-stack": "^2.1.1",
        "react-navigation-tabs": "^2.7.0",
        "react-redux": "^7.2.0",
        "redux": "^4.0.5",
        "redux-devtools-extension": "^2.13.8",
        "redux-persist": "^5.10.0",
        "redux-thunk": "^2.3.0",
        "sentry-expo": "^4.0.0",
        "yup": "^0.28.1"
    },
    "pre-commit": [
        "lint"
    ],
    "devDependencies": {
        "@babel/core": "^7.12.9",
        "babel-eslint": "^10.1.0",
        "babel-preset-expo": "9.0.2",
        "eslint": "^7.5.0",
        "eslint-config-prettier": "^6.10.0",
        "eslint-config-react-app": "^5.2.1",
        "eslint-plugin-flowtype": "^5.2.0",
        "eslint-plugin-import": "^2.22.0",
        "eslint-plugin-jsx-a11y": "^6.3.1",
        "eslint-plugin-prettier": "^3.1.4",
        "eslint-plugin-react": "^7.20.3",
        "eslint-plugin-react-hooks": "^4.0.8",
        "eslint-plugin-react-native": "^3.8.1",
        "pre-commit": "^1.2.2",
        "prettier": "^1.19.1",
        "react-native-debugger-open": "^0.3.24"
    },
    "private": true
}



q@Hanis-MacBook-Pro kaqa-app % yarn run react-native-bundle-visualizer  --verbose              
yarn run v1.22.17
$ /Users/q/work/code/kaqa-app/node_modules/.bin/react-native-bundle-visualizer --verbose
Generating bundle...
                    Welcome to Metro!
              Fast - Scalable - Integrated


Error: Unable to resolve module ../../App from /Users/q/work/code/kaqa-app/node_modules/expo/AppEntry.js: 

None of these files exist:
  * App(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  * App/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  1 | import registerRootComponent from 'expo/build/launch/registerRootComponent';
  2 |
> 3 | import App from '../../App';
    |                  ^
  4 |
  5 | registerRootComponent(App);
  6 |
    at ModuleResolver.resolveDependency (/Users/q/work/code/kaqa-app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:211:15)
    at DependencyGraph.resolveDependency (/Users/q/work/code/kaqa-app/node_modules/metro/src/node-haste/DependencyGraph.js:413:43)
    at Object.resolve (/Users/q/work/code/kaqa-app/node_modules/metro/src/lib/transformHelpers.js:317:42)
    at resolve (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:629:33)
    at /Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:645:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:644:33)
    at /Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:329:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:24)
info Run CLI with --verbose flag for more details.
/Users/q/work/code/kaqa-app/node_modules/react-native-bundle-visualizer/node_modules/execa/lib/error.js:60
                error = new Error(message);
                        ^

Error: Command failed with exit code 1: ./node_modules/.bin/react-native bundle --platform ios --dev false --entry-file ./node_modules/expo/AppEntry.js --bundle-output /var/folders/nh/nh_n20t92t3529htrfqw2xn80000gn/T/react-native-bundle-visualizer/KaQa/ios.bundle --sourcemap-output /var/folders/nh/nh_n20t92t3529htrfqw2xn80000gn/T/react-native-bundle-visualizer/KaQa/ios.bundle.map
error Unable to resolve module ../../App from /Users/q/work/code/kaqa-app/node_modules/expo/AppEntry.js: 

None of these files exist:
  * App(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  * App/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  1 | import registerRootComponent from 'expo/build/launch/registerRootComponent';
  2 |
> 3 | import App from '../../App';
    |                  ^
  4 |
  5 | registerRootComponent(App);
  6 |.
                    Welcome to Metro!
              Fast - Scalable - Integrated


Error: Unable to resolve module ../../App from /Users/q/work/code/kaqa-app/node_modules/expo/AppEntry.js: 

None of these files exist:
  * App(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  * App/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  1 | import registerRootComponent from 'expo/build/launch/registerRootComponent';
  2 |
> 3 | import App from '../../App';
    |                  ^
  4 |
  5 | registerRootComponent(App);
  6 |
    at ModuleResolver.resolveDependency (/Users/q/work/code/kaqa-app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:211:15)
    at DependencyGraph.resolveDependency (/Users/q/work/code/kaqa-app/node_modules/metro/src/node-haste/DependencyGraph.js:413:43)
    at Object.resolve (/Users/q/work/code/kaqa-app/node_modules/metro/src/lib/transformHelpers.js:317:42)
    at resolve (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:629:33)
    at /Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:645:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:644:33)
    at /Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:329:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:24)
info Run CLI with --verbose flag for more details.
    at makeError (/Users/q/work/code/kaqa-app/node_modules/react-native-bundle-visualizer/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/q/work/code/kaqa-app/node_modules/react-native-bundle-visualizer/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  shortMessage: 'Command failed with exit code 1: ./node_modules/.bin/react-native bundle --platform ios --dev false --entry-file ./node_modules/expo/AppEntry.js --bundle-output /var/folders/nh/nh_n20t92t3529htrfqw2xn80000gn/T/react-native-bundle-visualizer/KaQa/ios.bundle --sourcemap-output /var/folders/nh/nh_n20t92t3529htrfqw2xn80000gn/T/react-native-bundle-visualizer/KaQa/ios.bundle.map',
  command: './node_modules/.bin/react-native bundle --platform ios --dev false --entry-file ./node_modules/expo/AppEntry.js --bundle-output /var/folders/nh/nh_n20t92t3529htrfqw2xn80000gn/T/react-native-bundle-visualizer/KaQa/ios.bundle --sourcemap-output /var/folders/nh/nh_n20t92t3529htrfqw2xn80000gn/T/react-native-bundle-visualizer/KaQa/ios.bundle.map',
  escapedCommand: '"./node_modules/.bin/react-native" bundle --platform ios --dev false --entry-file "./node_modules/expo/AppEntry.js" --bundle-output "/var/folders/nh/nh_n20t92t3529htrfqw2xn80000gn/T/react-native-bundle-visualizer/KaQa/ios.bundle" --sourcemap-output "/var/folders/nh/nh_n20t92t3529htrfqw2xn80000gn/T/react-native-bundle-visualizer/KaQa/ios.bundle.map"',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: '                    Welcome to Metro!\n' +
    '              Fast - Scalable - Integrated\n' +
    '\n' +
    '\n' +
    'Error: Unable to resolve module ../../App from /Users/q/work/code/kaqa-app/node_modules/expo/AppEntry.js: \n' +
    '\n' +
    'None of these files exist:\n' +
    '  * App(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)\n' +
    '  * App/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)\n' +
    "\x1B[0m \x1B[90m 1 |\x1B[39m \x1B[36mimport\x1B[39m registerRootComponent \x1B[36mfrom\x1B[39m \x1B[32m'expo/build/launch/registerRootComponent'\x1B[39m\x1B[33m;\x1B[39m\x1B[0m\n" +
    '\x1B[0m \x1B[90m 2 |\x1B[39m\x1B[0m\n' +
    "\x1B[0m\x1B[31m\x1B[1m>\x1B[22m\x1B[39m\x1B[90m 3 |\x1B[39m \x1B[36mimport\x1B[39m \x1B[33mApp\x1B[39m \x1B[36mfrom\x1B[39m \x1B[32m'../../App'\x1B[39m\x1B[33m;\x1B[39m\x1B[0m\n" +
    '\x1B[0m \x1B[90m   |\x1B[39m                  \x1B[31m\x1B[1m^\x1B[22m\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 4 |\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 5 |\x1B[39m registerRootComponent(\x1B[33mApp\x1B[39m)\x1B[33m;\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 6 |\x1B[39m\x1B[0m\n' +
    '    at ModuleResolver.resolveDependency (/Users/q/work/code/kaqa-app/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:211:15)\n' +
    '    at DependencyGraph.resolveDependency (/Users/q/work/code/kaqa-app/node_modules/metro/src/node-haste/DependencyGraph.js:413:43)\n' +
    '    at Object.resolve (/Users/q/work/code/kaqa-app/node_modules/metro/src/lib/transformHelpers.js:317:42)\n' +
    '    at resolve (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:629:33)\n' +
    '    at /Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:645:26\n' +
    '    at Array.reduce (<anonymous>)\n' +
    '    at resolveDependencies (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:644:33)\n' +
    '    at /Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:329:33\n' +
    '    at Generator.next (<anonymous>)\n' +
    '    at asyncGeneratorStep (/Users/q/work/code/kaqa-app/node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:24)\n' +
    'info Run CLI with --verbose flag for more details.',
  stderr: 'error Unable to resolve module ../../App from /Users/q/work/code/kaqa-app/node_modules/expo/AppEntry.js: \n' +
    '\n' +
    'None of these files exist:\n' +
    '  * App(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)\n' +
    '  * App/index(.native|.ios.js|.native.js|.js|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)\n' +
    "\x1B[0m \x1B[90m 1 |\x1B[39m \x1B[36mimport\x1B[39m registerRootComponent \x1B[36mfrom\x1B[39m \x1B[32m'expo/build/launch/registerRootComponent'\x1B[39m\x1B[33m;\x1B[39m\x1B[0m\n" +
    '\x1B[0m \x1B[90m 2 |\x1B[39m\x1B[0m\n' +
    "\x1B[0m\x1B[31m\x1B[1m>\x1B[22m\x1B[39m\x1B[90m 3 |\x1B[39m \x1B[36mimport\x1B[39m \x1B[33mApp\x1B[39m \x1B[36mfrom\x1B[39m \x1B[32m'../../App'\x1B[39m\x1B[33m;\x1B[39m\x1B[0m\n" +
    '\x1B[0m \x1B[90m   |\x1B[39m                  \x1B[31m\x1B[1m^\x1B[22m\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 4 |\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 5 |\x1B[39m registerRootComponent(\x1B[33mApp\x1B[39m)\x1B[33m;\x1B[39m\x1B[0m\n' +
    '\x1B[0m \x1B[90m 6 |\x1B[39m\x1B[0m.',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.