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

Unhandled Rejection (TypeError): Cannot read property 'call' of undefined when clicking Link #5636

Closed
MoritzR opened this issue Nov 8, 2018 · 7 comments

Comments

@MoritzR
Copy link

MoritzR commented Nov 8, 2018

Bug report

Describe the bug

When running next.js in dev mode and clicking on a link, the error Unhandled Rejection (TypeError): Cannot read property 'call' of undefined until the linked page has been refreshed at least once. It seems to be related to using sass, css and typescript exports.

To Reproduce

Follow the readme in this repository: https://github.com/leanovate/nextjs-hmr-bug

Expected behavior

When clicking the link, the linked page appears and no error is thrown.

Screenshots

hmr-bug

hmr-bug

System information

  • OS: macOs
  • Browser: Chrome version 70.0.3538.77
  • Version of Next.js: 7.0.2
@timneutkens
Copy link
Member

Duplicate of vercel/next-plugins#282

@timneutkens timneutkens marked this as a duplicate of vercel/next-plugins#282 Nov 8, 2018
@MoritzR
Copy link
Author

MoritzR commented Nov 14, 2018

@timneutkens I am not sure that zeit/next-plugins#282 is related to the same problem.
I tried the suggested solution but it didn't have an effect: https://github.com/leanovate/nextjs-hmr-bug/tree/no-fix-update-to-canary-plugins-plus-app-fix

It seems to be related to sass/css though. Should I re-create this ticket in zeit/next-plugins?

@Jero786
Copy link
Contributor

Jero786 commented Nov 20, 2018

@MoritzR How are you?? could you find some workaround to fix that? Seems like in FF works, but in no in Chrome, do you see it?

@MoritzR
Copy link
Author

MoritzR commented Nov 20, 2018

could you find some workaround to fix that? Seems like in FF works, but in no in Chrome, do you see it?

@Jero786 You can have a look at a workaround here: leanovate/nextjs-hmr-bug#3
I need some more time to understand everything related to the problem but maybe you can get some more insights from the workaround.

@jaywcjlove
Copy link

@MoritzR Solve the ESLint warning and the problem is solved.

E.g: Modify .eslintrc file

{
  ....
  "rules": {
    ...
    "no-console": 1
  }
}

@Jero786
Copy link
Contributor

Jero786 commented Nov 26, 2018

@MoritzR Solve the ESLint warning and the problem is solved.

E.g: Modify .eslintrc file

{
  ....
  "rules": {
    ...
    "no-console": 1
  }
}

@MoritzR Seems like it's working after I put that rule!!! thanks a lot! after almost a month I could work again with Chrome!! thank you very very much!!!!

@icflorescu
Copy link

None of the fixes I've tried so far worked for me, so I've come up with this one: vercel/next-plugins#282 (comment)

@lock lock bot locked as resolved and limited conversation to collaborators Feb 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants