Overview of this article

This article guides you through the steps necessary to upload source maps for your front-end scripts. Source maps help make error messages and stack traces more readable. What are source maps?

When you upload source maps to Bugpilot, you will benefit from easier-to-read stack traces when frontend or network errors occur, right in your Bugpilot reports.


  1. Grab a Bugpilot CLI executable from here: Download Bugpilot CLI. You can add the CLI to your project or download it every time a build runs (for example, with CURL:
    curl -o bugpilot-cli https://cli-downloads.bugpilot.io/bugpilot_linux_amd64)

  2. Get a Source Map Upload Secret from your Bugpilot Dashboard, under Integrations > Source Maps.

  3. You will need to update your CI/CD pipeline to execute one additional command when deploying a new version, similar to what you probably already did with Sentry.

Uploading source-maps

Add the following command after you build a frontend build project. This command will need to execute every time a new version of your app is deployed:

./bugpilot -workspaceId <BUGPILOT-WORKSPACE-ID> -auth <BUGPILOT-FILES-UPLOAD-SECRET> upload-sourcemaps

This command uploads all the .js.map files it can find in the current folder and all its subfolders to Bugpilot.

Additional notes and limitations

  1. All source maps are automatically deleted after 60 days.

  2. There is no current limitation on the number and size of the source maps you can upload, but we plan to introduce reasonable limits in the near future.

  3. Source map files must have unique names (e.g., include a version number or a hash). This is the default behavior if you're using modern frameworks like Create-react-app.

Did this answer your question?