Giter Site home page Giter Site logo

Comments (6)

mattrabe avatar mattrabe commented on May 3, 2024 1

I had this same problem, and at least in my case, the solution was knowing where to look for the output...

My experience:

I run react-native-bundle-visualizer (using any method). I get a CLI response with return code 0 (non-error). The "Unable to map" message is the last line in CLI output. And then... nothing happens...

My setup:

I host all of my projects on a different machine than the one I sit at. It is a server on my local network. I access everything over SSH on that host machine.

What went wrong:

The reason "nothing happened" is because *a browser window was automatically opened which displays the visualizer's output - but that browser happens to be on my host machine, not the one I am sitting in front of!*

I then found this ticket, wherein the OP and others appear to be reporting an error/failure, and at the same time the moderator sees nothing wrong... A little later, when I happened to turn on my server's monitor, there were all of my visualization tabs opened in a browser...

How to "fix" it:

@deathemperor @novonimo I recommend you suspect your browser setup. Where is your browser? Is it on your local machine, is it somewhere else, can it be opened automatically?

@IjzerenHein I think it would be useful if two things were added:

  1. The readme should explicitly state that a browser window will be automatically opened. If it had, I would have known exactly what to do since I deal with this all the time with my local-server setup.
  2. The last line of the CLI output should state something like "Output written to /path/to/output. Visit /path/to/browser/readable/file in a browser". The current "Unable to map" line appears as an error to anyone who doesn't happen to have a browser window automatically open in front of them.

Not everyone does local dev on the same machine where their project files are located (code-server users, some enterprise setups, anyone who runs a local server like I do). VS Code and others provide built-in support for sshing into a different machine. I turn off browsersync on projects, because they would always open on that different host machine... So to take this a step further, people with a setup similar to mine are also going to want the ability to disable the automatic browser opening, and instead manually go to the URL which needs to be outputted to CLI.

from react-native-bundle-visualizer.

nedjs avatar nedjs commented on May 3, 2024 1

Was also having this issue, for myself it was not actually an error but the output was not showing, this was due to me running it in WSL on Windows and it was not opening the webpage. Doing it in Powershell made it work file.

If you really want to run it in WSL you may be able to open the webpage manually which is located in Windows at: %TEMP%/react-native-bundle-visualizer/topia/output/explorer.html

from react-native-bundle-visualizer.

novonimo avatar novonimo commented on May 3, 2024

sane error :

Unable to map 898765/3810818 bytes (23.58%)

from react-native-bundle-visualizer.

IjzerenHein avatar IjzerenHein commented on May 3, 2024

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.

In what way does it fail? Output looks good to me..

from react-native-bundle-visualizer.

jihoon416 avatar jihoon416 commented on May 3, 2024

I was also running in WSL, and I had to go into /tmp/react-native-bundle-visualizer to find the explorer.html after running this tool in WSL

from react-native-bundle-visualizer.

akshay-khapare avatar akshay-khapare commented on May 3, 2024

Generating bundle...
Welcome to Metro v0.80.6
Fast - Scalable - Integrated

info Writing bundle output to:, C:\Users\aksha\AppData\Local\Temp\react-native-bundle-visualizer\Hinduzz\android.bundle
info Writing sourcemap output to:, C:\Users\aksha\AppData\Local\Temp\react-native-bundle-visualizer\Hinduzz\android.bundle.map
info Done writing bundle output
info Done writing sourcemap output
Bundle is 5.02 MB in size (unchanged since last run)
=== error === {
bundles: [],
errors: [
{
bundleName: 'C:\Users\aksha\AppData\Local\Temp\react-native-bundle-visualizer\Hinduzz\android.bundle',
code: 'InvalidMappingColumn',
message: 'Your source map refers to generated column 14 on line 3, but the source only contains 1 column(s) on that line.\n' +
'Check that you are using the correct source map.',
error: [AppError]
}
]
} how to solve this error

from react-native-bundle-visualizer.

Related Issues (20)

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.