React 17: Property expression of JSXExpressionContainer expected node to be of a type ["Expression","JSXEmptyExpression"] but instead got undefined
See original GitHub issueBug 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.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Property expression of ExpressionStatement expected ...
But I am facing the below error while trying to build it using ./gradlew assembleRelease. @babel/template placeholder "$1": Property expression ...
Read more >JSX In Depth
The first part of a JSX tag determines the type of the React element. Capitalized types indicate that the JSX tag is referring...
Read more >Useful Patterns by Use Case - React TypeScript Cheatsheets
Wrapping/Mirroring a HTML Element. Usecase: you want to make a <Button> that takes all the normal props of <button> and does extra stuff ......
Read more >Issues in react-router when import any component in my ...
yo @microsoft/sharepoint (use react framework and client site type is WebPart). npm install react roter-dom. import BrowserRouter from react- ...
Read more >How to Read React Errors (fix 'Cannot read property of ...
Got an error like this in your React component? Cannot read property `map` of undefined. In this post we'll talk about how to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Uhm,
rm -rf yarn.lock yarn-error.log node_modules/ build/ .next/ && yarn install && yarn dev
fixed my issue 🤔 @jakeherpThis issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.