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

Nuxt 3 Support #619

Closed
harlan-zw opened this issue Sep 11, 2023 · 29 comments
Closed

Nuxt 3 Support #619

harlan-zw opened this issue Sep 11, 2023 · 29 comments
Labels

Comments

@harlan-zw
Copy link
Contributor

Hey 👋 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 (#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

Copy link
Member

cc: @manniL

@rchl
Copy link
Member

rchl commented Sep 11, 2023

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.

Copy link
Member

danielroe commented Sep 11, 2023

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

@rchl
Copy link
Member

rchl commented Sep 11, 2023

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?

@TheAlexLichter
Copy link
Member

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 😋

@rchl
Copy link
Member

rchl commented Sep 11, 2023

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.

@TheAlexLichter
Copy link
Member

TheAlexLichter commented Sep 11, 2023

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.

@rchl
Copy link
Member

rchl commented Sep 11, 2023

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)

@TheAlexLichter
Copy link
Member

TheAlexLichter commented Sep 11, 2023

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?

@rchl
Copy link
Member

rchl commented Sep 11, 2023

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 #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 :)

@creazy231

This comment was marked as off-topic.

@mukundshah
Copy link

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

@yanghoxom
Copy link

@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

@TheAlexLichter
Copy link
Member

No, there is no Nuxt 3 support yet.

@TheAlexLichter
Copy link
Member

@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
Copy link
Member

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

@TheAlexLichter
Copy link
Member

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.

@devonik
Copy link

devonik commented Sep 27, 2023

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

@rchl
Copy link
Member

rchl commented Sep 27, 2023

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
Copy link
Member

* 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 ☺️

@ssyberg
Copy link

ssyberg commented Oct 3, 2023

Following!

@simonmaass
Copy link

is there any eta for nuxt 3 support?

@simonmaass
Copy link

@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?

@AnthonyRuelle
Copy link

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

@luckylooke
Copy link

Guys did you manage to do some workaround? Until this v3 support will be implemeneted.. 🤔

@TheAlexLichter
Copy link
Member

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 TheAlexLichter removed their assignment May 17, 2024
@robsonsobral
Copy link
Contributor

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

Thank you!

@TheAlexLichter
Copy link
Member

@robsonsobral PR welcome for that I'd say 👍🏻

Also good to link getsentry/sentry-javascript#6929 so people can voice their need of Sentry for Nuxt 3 there ☺️

@rchl
Copy link
Member

rchl commented Aug 27, 2024

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

@rchl rchl closed this as completed Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests