next-translate: next-translate doesn't load if using styled components
When adding a configuration, I get an error in _document that says
Class constructor App cannot be invoked without 'new'
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (10 by maintainers)
ah! that’s amazing, thanks so much
@aralroca I found the really weird issues. I don’t think it has anything to do with styled components.
The issue is that if you use next-translate and your _app.tsx/_app.js is a class component it will fail. Easy fix to not use a class component, you can see the issue here. Not sure if a bug, but it took me a while to realize.
https://github.com/dsauna/next-translate-styled
Yes, removing it fixes it. Let me try adding a reprodusable example.
I’m actually using canary 1.0.0-canary.2 and see the problem there.