next.js: React 17: Property expression of JSXExpressionContainer expected node to be of a type ["Expression","JSXEmptyExpression"] but instead got undefined
Bug report
Describe the bug
In a Next.js project using styled-jsx I get the following error across different components that create a <style jsx> tag to generate CSS selectors within template literals (or import such styles from a separate file):
Property expression of JSXExpressionContainer expected node to be of a type ["Expression","JSXEmptyExpression"] but instead got undefined
The error appears as soon as I update react and react-dom to 17.0.0 and might be related to the new JSX transform in React v17.
Expected behavior
It renders the component as expected without any errors.
System information
- OS: macOS Catalina
- Version of React: 17.0.0
- Version of Next.js: 9.5.5
- Version of Node.js: 12.18.3
- Version of TypeScript: 4.0.3
Additional context
Add any other context about the problem here.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 17 (8 by maintainers)
Uhm,
rm -rf yarn.lock yarn-error.log node_modules/ build/ .next/ && yarn install && yarn dev
fixed my issue 🤔 @jakeherp