sentry-module icon indicating copy to clipboard operation
sentry-module copied to clipboard

Nuxt 3 Support

Open harlan-zw opened this issue 2 years ago β€’ 28 comments

Hey :wave: It looks like this module hasn't been updated for Nuxt 3. In an effort to improve the developer experience of modules, I've updated the module to clarify that it only supports Nuxt 2.

I can see Nuxt 3 support is in development (https://github.com/nuxt-community/sentry-module/issues/530), if you need any help please let me know.

When Nuxt 3 support is added we can move the repo to the https://github.com/nuxt-modules organisation.

Thanks!

cc: @rchl

harlan-zw avatar Sep 11 '23 11:09 harlan-zw

cc: @manniL

danielroe avatar Sep 11 '23 11:09 danielroe

I suppose it would make sense to also update documentation and readme and state more clearly that only Nuxt 2 is supported.

As for Nuxt 3 support, I don't think anyone is actively working on that right now so anyone is free to help with that.

rchl avatar Sep 11 '23 11:09 rchl

(I believe @manniL is implementing this for Nuxt 3.)

danielroe avatar Sep 11 '23 11:09 danielroe

Had no idea. Would be good to know what's the plan there. Is the intention to create a PR here or work on it entirely separately?

rchl avatar Sep 11 '23 11:09 rchl

Hey πŸ‘‹ Yes, I (and some other people) will work on a module. As the new module should cover Nitro and Nuxt, I'd suggest to keep the Nuxt 2 and Nuxt 3 version of the sentry module separate (so no direct PR) - but I'm happy to discuss this πŸ˜‹

TheAlexLichter avatar Sep 11 '23 13:09 TheAlexLichter

I feel like that could result in a confusing situation. What would the Nuxt 3 package be called then? And how clear would it be that one is for Nuxt 2 and one is for Nuxt 3?

If all is kept in the same repo then we'd also need to figure how to handle documentation but I suppose there could be two separate URLs and one would link to the other.

rchl avatar Sep 11 '23 13:09 rchl

I agree. I've thought about these options:

Separate Repositories, Separate Package names

  • Refer to each repository in README, state what is compatible with Nuxt 2 / Nuxt 3
  • Allows separate development

Separate Repositories, same package name

  • Keep current major version Nuxt 2 compatible, release Nuxt 3 compat from next major on
  • Refer to each repository and version in README, state what is compatible with Nuxt 2 / Nuxt 3
  • Allows separate development (Except major release for Nuxt 2 compatibility)

Same Repositories, same package name

  • Keep current major version Nuxt 2 compatible, release Nuxt 3 compat from next major on
  • Refer to each repository and version in README, state what is compatible with Nuxt 2 / Nuxt 3
  • Separate development only partially possible (subbranch in same repo), similar to the i18n module

I'd recommend against trying to fit Nuxt 2 and 3 compat in one version and keep them separate, also given Nuxt 2 going EOL in a mere 3,5 months, as well as more complex project setup (e.g. testing) + code.

TheAlexLichter avatar Sep 11 '23 13:09 TheAlexLichter

Separate package names could be IMO very confusing so I would vote against that personally.

As for the same or separate repo, I'm not sure. Re-using same repo seems natural but not sure if there are good arguments against that. We could bump major version by 2 or 3 to give Nuxt 2 version some room.

I'd recommend against trying to fit Nuxt 2 and 3 compat in one version

Yeah, that's not gonna work. Wasn't gonna suggest that.

also given Nuxt 2 going EOL in a mere 3,5 months

I doubt :)

(BTW. Separate Repositories, same package name is listed twice in your comment)

rchl avatar Sep 11 '23 14:09 rchl

Re-using same repo seems natural but not sure if there are good arguments against that.

I guess here it'd be more about the org overhead (issues/PRs/suggestions per versions/doc deployment per version).

Do you plan on maintaining the Nuxt 2 Version of the Sentry module further? Do you want to be involved in development of the Nuxt 3 version (or: did something change compared to the old Nuxt 3 support issue)?

I doubt :)

How do you mean that?

TheAlexLichter avatar Sep 11 '23 18:09 TheAlexLichter

I think it would be beneficial for me to oversee the development of the Nuxt 3 version. Even if I'm currently not using Nuxt 3 myself and might not want to focus on that version myself. My latest plans regarding that are in https://github.com/nuxt-community/sentry-module/issues/530.

And yes, I would be maintaining the Nuxt 2 version for the time being since converting to Nuxt 3 is not in the near term plans.

How do you mean that?

Just my personal feeling. Given how rough the transition to Nuxt 3 was and still is, I feel it would be rather premature to end support for Nuxt 2 soon. But I don't know anything more than the next guy :)

rchl avatar Sep 11 '23 21:09 rchl

glad to see you in here @manniL if I can help debugging / testing let me know πŸ₯³

creazy231 avatar Sep 13 '23 23:09 creazy231

@manniL can you share your work so far? is your latest work in nuxt3 branch?

mukundshah avatar Sep 16 '23 03:09 mukundshah

@harlan-zw Hello #nuxt3 branch ready to use? i tried adding it to my project in package.json i used

"@nuxtjs/sentry": "nuxt-community/sentry-module#nuxt3",

in nuxt.config.js, I have config like this

     modules: [
         ['@nuxtjs/sentry', {
           ...
         }],
   ]

but I get an error

  Cannot start nuxt: Cannot find module '[project directory]/@nuxtjs/sentry

yanghoxom avatar Sep 18 '23 01:09 yanghoxom

No, there is no Nuxt 3 support yet.

TheAlexLichter avatar Sep 18 '23 07:09 TheAlexLichter

@rchl Let's go with the same repo then. Might be easier and other modules (e.g. i18n) do the same πŸ‘ In case the org effort will be too high, we can change that later on too.

TheAlexLichter avatar Sep 18 '23 07:09 TheAlexLichter

@rchl Would you mind assigning me to the Nuxt 3 issues?

TheAlexLichter avatar Sep 27 '23 15:09 TheAlexLichter

Also, I wrote an article about why building the module takes longer than running your own implementation + included a very simple recipe if you need Sentry right now and can't wait.

TheAlexLichter avatar Sep 27 '23 16:09 TheAlexLichter

Also, I wrote an article about why building the module takes longer than running your own implementation + included a very simple recipe if you need Sentry right now and can't wait.

Awesome. I will give it a try. Thank you

devonik avatar Sep 27 '23 16:09 devonik

Also, I wrote an article about why building the module takes longer than running your own implementation + included a very simple recipe if you need Sentry right now and can't wait.

  • Minor improvement to the client code - import specific exports instead of * to allow tree shaking to work. (ref https://github.com/nuxt-community/sentry-module/pull/547)
  • The requestHandler and errorHandler middlewares for express (https://docs.sentry.io/platforms/node/guides/express/) have quite a bit of logic in them (sessions, transactions, ...). Might not be necessary for the simple temporary setup but this is something that would have to be figured out for Nuxt 3 version.

rchl avatar Sep 27 '23 17:09 rchl

* Minor improvement to the client code - import specific exports instead of `*` to allow tree shaking to work. (ref [fix: significantly reduce client bundle size #547](https://github.com/nuxt-community/sentry-module/pull/547))

Good point πŸ‘

* The `requestHandler` and `errorHandler` middlewares for express ([docs.sentry.io/platforms/node/guides/express](https://docs.sentry.io/platforms/node/guides/express/)) have quite a bit of logic in them (sessions, transactions, ...). Might not be necessary for the simple temporary setup but this is something that would have to be figured out for Nuxt 3 version.

Absolutely, I think that'd be super helpful for the nitro integration ☺️

TheAlexLichter avatar Sep 27 '23 18:09 TheAlexLichter

Following!

ssyberg avatar Oct 03 '23 14:10 ssyberg

is there any eta for nuxt 3 support?

simonmaass avatar Nov 16 '23 11:11 simonmaass

@manniL Thank you so much for the article and the work you have put into this! You wrote in Sep 2023 "Yes, I (and some other people) will work on a module. " Do you have any update for us on the progress?

simonmaass avatar Mar 04 '24 09:03 simonmaass

Hello, Up @manniL, Do you have any update for us on the progress? :D

AnthonyRuelle avatar Apr 12 '24 09:04 AnthonyRuelle

Guys did you manage to do some workaround? Until this v3 support will be implemeneted.. πŸ€”

luckylooke avatar May 16 '24 12:05 luckylooke

I'm afraid I will not be able to release the module in foreseeable time. I've tried various ways but eventually couldn't find a good architecture to keep things as configurable "as they should be". Unfortunately, I don't have the time at the moment to give it another try.

What to do instead

Please make sure to raise your opinion in this discussion and ensure to make clear the Nuxt community would love to see a first-class support from Sentry πŸ”₯

(I've also linking to a recipe which you can find in this post.)

TheAlexLichter avatar May 17 '24 12:05 TheAlexLichter

Can you, please, add, then, to https://sentry.nuxtjs.org/ that the module is exclusive to Nuxt 2?

Thank you!

robsonsobral avatar May 22 '24 02:05 robsonsobral

@robsonsobral PR welcome for that I'd say πŸ‘πŸ»

Also good to link https://github.com/getsentry/sentry-javascript/discussions/6929 so people can voice their need of Sentry for Nuxt 3 there ☺️

TheAlexLichter avatar May 22 '24 11:05 TheAlexLichter

I've updated readme and documentation with links to the Nuxt 3 module.

rchl avatar Aug 27 '24 08:08 rchl