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

SWC breaks full calendar #44983

Closed
1 task done
christianjuth opened this issue Jan 17, 2023 · 4 comments
Closed
1 task done

SWC breaks full calendar #44983

christianjuth opened this issue Jan 17, 2023 · 4 comments
Assignees
Labels
bug Issue was opened via the bug report template.

Comments

@christianjuth
Copy link

Verify canary release

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

Provide environment information

Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
Binaries:
Node: 19.4.0
npm: 9.2.0
Yarn: 3.3.1
pnpm: N/A
Relevant packages:
next: 13.1.3-canary.2
eslint-config-next: 13.1.2
react: 18.2.0
react-dom: 18.2.0

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

SWC minifier (swcMinify: true)

Link to the code that reproduces this issue

https://github.com/breakthelovenewyork/next-full-calendar-test

To Reproduce

Build the repository and visit the top level index route.

Alternatively you can try this deployment I already made and look at the console.

https://full-calendar-test-christianjuth-breakthelovenewyork.vercel.app//

Describe the Bug

Next app builds and page loads initially. However, as soon as I try to interact with full calendar I get this weird null pointer error in the console. It seems – without really knowing how minifiers work – that SWC is removing an object it shouldn't be, causing the app to crash when full calendar tries to access properties on that object.

Uncaught TypeError: Cannot read properties of undefined (reading 'allDay')
    at ns (e501331d-4147ea66e121ec61.js:1:53236)
    at ru.render (e501331d-4147ea66e121ec61.js:1:89153)
    at T (407-ab674bd8c72b08ef.js:1:13663)
    at w (407-ab674bd8c72b08ef.js:1:9982)
    at T (407-ab674bd8c72b08ef.js:1:14047)
    at w (407-ab674bd8c72b08ef.js:1:9982)
    at 407-ab674bd8c72b08ef.js:1:15199
    at T (407-ab674bd8c72b08ef.js:1:15569)
    at w (407-ab674bd8c72b08ef.js:1:9982)
    at T (407-ab674bd8c72b08ef.js:1:14047)

If I set the following option it starts working.

// next.config.js
const nextConfig = {
  swcMinify: false
}

Expected Behavior

My app should word the same whether SWC is enabled or not.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Vercel

@christianjuth christianjuth added the bug Issue was opened via the bug report template. label Jan 17, 2023
@mohux
Copy link

mohux commented Feb 5, 2023

I am having the same issue and due to it, had to disabled SWC

@kdy1
Copy link
Member

kdy1 commented Feb 12, 2023

Fixed by #45776

image

@kdy1 kdy1 closed this as completed Feb 12, 2023
@mohux
Copy link

mohux commented Feb 13, 2023

I can confirm that this solved the issue for me
updating to next@canary solved the issue

@kdy1 thank you so much

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. 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 Mar 16, 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.
Projects
None yet
Development

No branches or pull requests

3 participants