Comments (6)
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:
- 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.
- 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.
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.
sane error :
Unable to map 898765/3810818 bytes (23.58%)
from react-native-bundle-visualizer.
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.
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.
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)
- 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().
- 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(). HOT 1
- How to visualize with source-map-explorer ? HOT 2
- triggerUncaughtException with react-native 0.71.2 HOT 11
- Source-map-explorer error HOT 37
- Bundle size does not reflect App Store size HOT 5
- Option to resolve path alias? HOT 5
- Running bundle visualizer in Expo project using Expo Router HOT 4
- What does [EOLs] represent in the bundle?
- No details? HOT 1
- Accept metro bundler config as an argument. HOT 1
- Pass existing bundle as argument HOT 7
- Cannot find module 'expo-asset/tools/hashAssetFiles' HOT 1
- Getting error command failed. HOT 7
- Fails with collision warning on Expo 42 & AWS Amplify HOT 2
- Cannot read property `pipe` of undefined HOT 3
- Verbose gives size [object Object] HOT 1
- EXPO SDK 44: error Unable to resolve module ../../App from node_modules/expo/AppEntry.js:
- Nx compatible? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-bundle-visualizer.