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

feat(nuxt): Automatically detect environment #15179

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

maximepvrt
Copy link
Contributor

@maximepvrt maximepvrt commented Jan 27, 2025

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

  • If you've added code that should be tested, please add tests.
  • Ensure your code lints and the test suite passes (yarn lint) & (yarn test).

closes #15147

@maximepvrt maximepvrt changed the title feat(nuxt): detect automatically environment feat(nuxt): detect automatically environment (#15147) Jan 27, 2025
@mydea mydea requested review from s1gr1d and andreiborza January 28, 2025 12:27
@mydea mydea changed the title feat(nuxt): detect automatically environment (#15147) feat(nuxt): detect automatically environment Jan 29, 2025
@mydea mydea changed the title feat(nuxt): detect automatically environment feat(nuxt): Automatically detect environment Jan 29, 2025
@mydea
Copy link
Member

mydea commented Jan 29, 2025

If the console logs are removed, should this be ready to be reviewed? :)

@maximepvrt
Copy link
Contributor Author

Hi @mydea, as mentioned in the issue, I tried setting up an environment to test locally, but my console.log statements aren't showing up, and I’m not sure if this is normal or if I made a mistake when setting up the local module. I opened the MR to get feedback on whether it's expected not to see the console.log outputs and why the environment setup isn't working on my end. Also, I feel like there’s a lack of a contribution guide, which could help with improving the module.

@maximepvrt
Copy link
Contributor Author

I attempted to import the module locally using:

export default defineNuxtConfig({
  modules: ['../sentry-javascript/packages/nuxt/src']
})

However, my app gets stuck on "ℹ Vite client warmed up" and doesn’t start.

@mydea
Copy link
Member

mydea commented Jan 30, 2025

Ah sorry, I did not connect this to the issue. Somebody from the team will look into it, we are quite swamped right now and parts of the team that have the most knowledge on Nuxt are currently unavailable, so it may take a few days, but we'll try to look into it next week latest!

@s1gr1d
Copy link
Member

s1gr1d commented Feb 3, 2025

This looks good in general, please add this to the E2E test as well (here). Regarding testing this locally: You can build the package, then build the tarball and then add this tarball like a npm package in your test application's node_modules. Then you can set up Sentry in Nuxt as you would normally do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nuxt environment not automatically detected by Sentry
3 participants