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

Multiple errors when running in TS & NextJS 15 #753

Open
ShayokhShorfuddin opened this issue Dec 19, 2024 · 1 comment
Open

Multiple errors when running in TS & NextJS 15 #753

ShayokhShorfuddin opened this issue Dec 19, 2024 · 1 comment
Labels
@barba/core @barba/core plugin bug bug to fix

Comments

@ShayokhShorfuddin
Copy link

What version are you using?

2.10.3

What package are you using?

@barba/core

Describe your issue

Hello. I am trying to learn and add BarbaJS to a NextJS 15 project. I was mostly looking for tutorials from YouTube and Barba Docs. However, I discovered that BarbaJS doesn't seem to work properly in TypeScript. I got multiple errors when I tried to implement it in a TSX component. These errors are -

  1. Could not find a declaration file for module '@barba/core'
  2. ReferenceError: Element is not defined

Here are the screenshots -
image
image

Here is the current broken repo that includes these issues - https://github.com/ShayokhShorfuddin/broken-barba-project

Please take a look into the issue. Thanks in advance.

@ShayokhShorfuddin ShayokhShorfuddin added the bug bug to fix label Dec 19, 2024
@xavierfoucrier xavierfoucrier added the @barba/core @barba/core plugin label Dec 19, 2024
@xavierfoucrier
Copy link
Member

Hello @ShayokhShorfuddin 👋

Thanks for opening an issue.
It's probably related to #739 🤔

There is already a patched version coming end of year / beginning 25'.

Note that, as explained in the docs:
When using a front-end framework like React, Vue or Next, you should take a look at the framework documentation and use everything the framework is bringing you, like page transitions, routes, etc. instead of trying to implement another library over a complex framework layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@barba/core @barba/core plugin bug bug to fix
Projects
None yet
Development

No branches or pull requests

2 participants