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

Plugins error (even though not loading any plugins) #379

Closed
resthedev opened this issue Jul 24, 2023 · 8 comments
Closed

Plugins error (even though not loading any plugins) #379

resthedev opened this issue Jul 24, 2023 · 8 comments

Comments

@resthedev
Copy link

resthedev commented Jul 24, 2023

I am getting the following error:

2961-809c1f3bec2099a2.js:1 TypeError: e.fn is not a function
    at 4196-45a1ea360224e18c.js:1:31229
    at Array.map (<anonymous>)
    at 4196-45a1ea360224e18c.js:1:31204
    at 4196-45a1ea360224e18c.js:1:37405
    at Array.reduce (<anonymous>)
    at eZ (4196-45a1ea360224e18c.js:1:27992)
    at 4196-45a1ea360224e18c.js:1:1643
    at ap (bce60fc1-0399b9eba6931719.js:9:68389)
    at ah (bce60fc1-0399b9eba6931719.js:9:68449)
    at ay (bce60fc1-0399b9eba6931719.js:9:68888)

Looking into the tippy.js repo code, I saw that this line has to do with plugins. I am not loading any plugins with tippy, so I'm not sure why it is trying to call fn() on a plugin. I saw that the @tippyjs-react library does load some of its own plugins, so maybe there is an issue there?

I wasn't having this issue prior, but started seeing it pop up now after I upgraded Next version 13.4.9 -> 13.4.10.

@CopyJosh
Copy link

CopyJosh commented Jul 25, 2023

Same issue. Not using the new app directory, so not sure what the fallout is from this last upgrade...

Been meaning to drop this dead package for awhile now... guess that time has come.

@atomiks
Copy link
Owner

atomiks commented Jul 25, 2023

Likely a Next.js minification bug, was also filed here: atomiks/tippyjs#1132

@DaanWevolver
Copy link

I have exactly the same issue after upgrading to next 13.4.11 (from next 12). downgrading to 13.4.9 fixed the issue for me.

@icyJoseph
Copy link

icyJoseph commented Jul 27, 2023

Hi, I believe the problem might be SWC. I've set up a playground example here

I've tested in Next.js and running with swcMinify set to false works. So I guess that's a pretty good indicator anyway.

For completeness sake, what happens is that:

Gets minified into an empty object, and calling fn() on it, crashes out.

@aslakson
Copy link

I ran into this issue and forked this repo with a temporary fix. I am filtering the plugins list and hard-coded the classNamePlugin in the two places it was being imported as a temporary workaround. I plan on switching back to this repo as soon as SWC stops doing what it's doing. I have no plans to support other bug fixes or changes, but use it if you want:

https://github.com/aslakson/tippyjs-react

yarn add @aslakson/tippyjs-react

@FengeRVictor
Copy link

Same issue for me started with nextjs 13.4.10

@icyJoseph
Copy link

icyJoseph commented Jul 28, 2023

I'll be fixed by swc-project/swc#7702 as indicated here: vercel/next.js#53151 (comment)

@resthedev
Copy link
Author

This appears fixed for me now as of NextJS v13.4.15

Thank you team!

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

No branches or pull requests

7 participants