question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ANDROID] Unable to pass sourceMap argument to packager

See original GitHub issue

We use crashlytics and it’s needed to have a sourcemap of our js file. It’s a problem when running release build, because we just can’t pass --sourcemap-output argument to packager. And we forced to use local react.gradle instead of bundled one from node_modules. (Gool ol’ copy-paste not welcome)

This bug was introduced by #6610 Commit: a7cde8045ba10d67896cc5b203d397eaf4f395d6

Solution: Add a boolean flag (generate source maps?) into commented-out section before apply from: "../../node_modules/react-native/react.gradle" line and consume it.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:7
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
IjzerenHeincommented, Aug 3, 2016

I can also confirm that it works (tried with v0.29). I’m using the following config in build.gradle to generate the source-map in the same location as the release bundle file:

project.ext.react = [
    extraPackagerArgs: ["--sourcemap-output", "$buildDir/intermediates/assets/release/index.android.bundle.map"]
]
apply from: "../../node_modules/react-native/react.gradle"
2reactions
rayshihcommented, Aug 2, 2016

I just tried it, and it works 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to parse source map - Stack Overflow
Now, source map is disabled only when you are running the app LOCALLY. ... And then add it to your package.json:
Read more >
gulp-sourcemaps - npm
Write external source map files. To write external source map files, pass a path relative to the destination to sourcemaps.write() . Example:.
Read more >
Emscripten Compiler Frontend (emcc)
This argument is ignored if a target other than HTML is specified using the -o option. --source-map-base <base-url>. [link] The URL ...
Read more >
Debug Angular apps in production without revealing source ...
At its core, a source map is a JSON file that contains all the necessary information to map the transpiled code back to...
Read more >
ASP.NET Core SignalR JavaScript client - Microsoft Learn
Install the SignalR client package; Connect to a hub; Call hub methods from the client ... Arguments the hub passes to the method....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found