Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--project-root doesn't expand relative paths #88

Open
1 task done
aaronklinker-st opened this issue Oct 2, 2023 · 2 comments
Open
1 task done

--project-root doesn't expand relative paths #88

aaronklinker-st opened this issue Oct 2, 2023 · 2 comments
Labels
backlog We hope to fix this feature/bug in the future bug Confirmed bug

Comments

@aaronklinker-st
Copy link

Describe the bug

I have a monorepo, whose sourcemaps rely on node modules in the root directory as well as the app directory. I tried setting --project-root option to ../.., but that didn't work. When running the below commands, the uploader doesn't expand the relative path, and thus fails to strip the project root from the source maps.

cd apps/app-name
bugsnag-source-maps upload-browser --project-root ../.. --dist apps/app-name/dist

This should either be documented or the path should be expanded if stripProjectRoot requires an absolute path.

The work around is to pass an absolute path for this URL, but that's very inconvenient.

pushd ../../
PROJECT_PATH="$(pwd)"
popd
bugsnag-source-maps upload-browser --project-root "$PROJECT_ROOT" --dist apps/app-name/dist

Steps to reproduce

  1. Run above command with a relative path for --project-root

Environment

  • bugsnag-source-maps version: 2.3.1
  • Uploading for:
    • Browser
  • Command that was run: bugsnag-source-maps upload-browser

Example code snippet

bugsnag-source-maps upload-browser --project-root ../.. --dist apps/app-name/dist
@mclack
Copy link

mclack commented Oct 10, 2023

Hi @aaronklinker-st

Thanks for highlighting this with us.

We are currently aware of some incompatibilities when it comes to monorepos working with @bugsnag/source-maps. We also have an item on our backlog to look into making some changes, where I have made a note of the issue you're experiencing. We can't currently give an ETA on when this may be looked at, but we will make sure to update this thread with any developments.

While we appreciate that the workaround you provided is not ideal, we recommend continuing with this method until we work on support for monorepos.

@mclack mclack added bug Confirmed bug backlog We hope to fix this feature/bug in the future labels Oct 10, 2023
@aaronklinker-st
Copy link
Author

Thanks! Since a workaround exists, no rush!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog We hope to fix this feature/bug in the future bug Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants