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

Regression of tippy.js between 13.4.10-canary.0 and 13.4.10-canary.1 #53151

Closed
1 task done
damianfrizzi opened this issue Jul 25, 2023 · 26 comments · Fixed by #53308 or #53416
Closed
1 task done

Regression of tippy.js between 13.4.10-canary.0 and 13.4.10-canary.1 #53151

damianfrizzi opened this issue Jul 25, 2023 · 26 comments · Fixed by #53308 or #53416
Assignees
Labels
bug Issue was opened via the bug report template. locked

Comments

@damianfrizzi
Copy link

damianfrizzi commented Jul 25, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:22 PDT 2023; root:xnu-8796.121.3~7/RELEASE_X86_64
Binaries:
  Node: 18.15.0
  npm: 9.6.6
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 13.4.12
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: N/A
Next.js Config:
  output: N/A

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

https://github.com/damianfrizzi/nextjs-tippy-regression

To Reproduce

  • Clone the minimal repro
  • Run yarn dev -> everything works fine
  • Run yarn build and yarn start -> app crashes with Application error: a client-side exception has occurred (see the browser console for more information).

Describe the Bug

We tried to upgrade to the latest Next.js and it broke pages that where using @tippyjs/react.
This only happens in production. Everything works correctly in development.

Git bisect shows me that the regression was introduced between 13.4.10-canary.0 (good) and 13.4.10-canary.1 (bad).

Expected Behavior

  • The behaviour between development and production should be the same
  • The app shouldn't crash in production
@damianfrizzi damianfrizzi added the bug Issue was opened via the bug report template. label Jul 25, 2023
@crypt0miester
Copy link

can confirm. having the same issue with tippy 4.2.6 on >13.4.10 as well. downgrading to =13.4.9 fixed it.

@focux
Copy link

focux commented Jul 27, 2023

I'm experiencing this as well. It broke after upgrading the Next.js version and it works on development but not in production. Tippy's author also confirmed that this looks like a minification issue on Next.js atomiks/tippyjs-react#379

@icyJoseph
Copy link
Contributor

Hi,

Disabling swcMinify fixes the issue:

Which leads me to believe this is an issue with SWC, as this playground, somewhat shows.

What happens is that the className plugin from tippy gets resolved to an empty object when minifying, and there's no fn property on such empty object.

@icyJoseph
Copy link
Contributor

I guess the course of action here is to track these (?):

And this, already closed, but related issue: #53096

@kdy1
Copy link
Member

kdy1 commented Jul 28, 2023

This will be fixed by swc-project/swc#7702

@kodiakhq kodiakhq bot closed this as completed in #53308 Jul 29, 2023
kodiakhq bot pushed a commit that referenced this issue Jul 29, 2023
### What?

Update `swc_core` to swc-project/swc@00a0575

### Why?

To fix minifier regression.

### How?

 - Closes WEB-1326
 - Fixes #53151
 - Fixes #53286
 - Fixes #53273
@shanehoban
Copy link

This looks like it was added, but then reverted in a canary release.

Any further updates on this?

@kdy1 kdy1 reopened this Aug 2, 2023
@kodiakhq kodiakhq bot closed this as completed in #53416 Aug 2, 2023
kodiakhq bot pushed a commit that referenced this issue Aug 2, 2023
### What?

Update `swc_core` to swc-project/swc@383509f

### Why?

To fix minifier regression.

### How?

 - Closes WEB-1326
 - Fixes #53151
 - Fixes #53286
 - Fixes #53273
@shanehoban
Copy link

Thanks for the work on this, but it seems the issue is not resolved with the changes contained in release 13.4.13-canary.13.

The error persists as described by the OP. Working locally, but errors out when built and run on production.

@kdy1 kdy1 reopened this Aug 3, 2023
@Geminii
Copy link

Geminii commented Aug 4, 2023

We are facing the same issue too 😭
Waiting for next version to upgrade 🙈

@clementgateaud
Copy link

We are also facing this issue with Tippy 😰

@kdy1 kdy1 changed the title Regression between 13.4.10-canary.0 and 13.4.10-canary.1 Regression of tippy.js between 13.4.10-canary.0 and 13.4.10-canary.1 Aug 6, 2023
@kdy1
Copy link
Member

kdy1 commented Aug 6, 2023

Well, this is already fixed. I did yarn add next@canary.

@shanehoban Please retry

image

@kdy1 kdy1 closed this as completed Aug 6, 2023
@shanehoban
Copy link

shanehoban commented Aug 7, 2023

@kdy1 thanks once again, but this still does not appear to be resolved for me, on latest canary:

Deployment here: https://chatterbox-hodev-5zx94dxmi-h-o.vercel.app/

window.next.version = '13.4.13-canary.18'

@kdy1
Copy link
Member

kdy1 commented Aug 7, 2023

@shanehoban Please provide a repro

@shanehoban
Copy link

shanehoban commented Aug 7, 2023

@kdy1 Here's one with the latest canary release: "next": "^13.4.14-canary.0",

https://github.com/shanehoban/nextjs-tippy-issue/

Just to be clear, it works during development, only fails when built for production.

@kdy1 kdy1 reopened this Aug 7, 2023
@kdy1
Copy link
Member

kdy1 commented Aug 7, 2023

@shanehoban
image

I did

  • clone
  • npm ci
  • rm -rf .next && yarn next build && yarn next start

@kdy1 kdy1 closed this as completed Aug 7, 2023
@shanehoban
Copy link

Not sure why it's working for you but not others, or myself:

image

@icyJoseph
Copy link
Contributor

Works for me too, using:

  Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000
    Binaries:
      Node: 18.16.0
      npm: 9.7.1
      Yarn: 1.22.19
      pnpm: 7.22.0
    Relevant Packages:
      next: 13.4.14-canary.0
      eslint-config-next: 13.4.13
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A

@shanehoban
Copy link

I deployed my github repo above, and it fails on vercel, this isn't completely closed yet I would imagine:

https://nextjs-tippy-issue.vercel.app/

Deployment ID: DG1D2kjN5QVhNNgp1bEXorZecWHy

@leffot
Copy link

leffot commented Aug 10, 2023

Can report that we're having the same issue here. Works locally and fails in production.

@kdy1
Copy link
Member

kdy1 commented Aug 10, 2023

@leffot Please provide a repro

@shanehoban
Copy link

@kdy1 have you tried deploying this repo to vercel? The issue is present when deployed even though it works for you locally.

@kdy1
Copy link
Member

kdy1 commented Aug 10, 2023

@shanehoban Yes it works

@shanehoban
Copy link

It doesn't though?

image

https://nextjs-tippy-issue.vercel.app/

On version 13.4.14-canary.1

Repo deployed: https://github.com/shanehoban/nextjs-tippy-issue

@icyJoseph
Copy link
Contributor

Does it fail locally for you @shanehoban? What Node version does the deployed version use?

@shanehoban
Copy link

shanehoban commented Aug 10, 2023

@icyJoseph Yeah it fails for me when built and run locally for prod (so the same outcome as the vercel deployment).

I'm on Node v18.17.0 on my local machine (Ubuntu via WSL) and vercel node is set to 18.x

Operating System:
      Platform: linux
      Arch: x64
      Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023
    Binaries:
      Node: 18.17.0
      npm: 9.6.7
      Yarn: 1.22.18
      pnpm: N/A
    Relevant Packages:
      next: 13.4.14-canary.1
      eslint-config-next: 13.4.14-canary.1
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A

@shartte
Copy link

shartte commented Aug 12, 2023

It works for me when building on Windows and fails when building on Ubuntu (Github Actions).

NextJS 13.4.13

p.s.: this is for a static site export, there is no Node on the deployed version

shartte added a commit to AppliedEnergistics/appliedenergistics.github.io that referenced this issue Aug 12, 2023
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked
Projects
None yet
Development

Successfully merging a pull request may close this issue.