Typescript error for some components in v3.10.0
See original GitHub issue- I have searched the issues of this repository and believe that this is not a duplicate.
Version
3.10.0
Environment
5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Reproduction link
https://github.com/ant-design/ant-design/blob/master/components/breadcrumb/Breadcrumb.tsx
Steps to reproduce
when I run my project, if import any antdesign component will show error, otherwise is fine error message is
/node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts
ERROR in /node_modules/antd/lib/breadcrumb/Breadcrumb.d.ts(25,52):
TS2694: Namespace '"/node_modules/@types/prop-types/index"' has no exported member 'ReactNodeLike'.
What is expected?
it should use PropTypes.ReactNode, not PropTypes.ReactNodeLike
What is actually happening?
type error
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:25 (7 by maintainers)
Top Results From Across the Web
NPM package cannot be used as a JSX Component
typescript - NPM package cannot be used as a JSX Component - Type errors - Stack Overflow. Stack Overflow for Teams – Start...
Read more >TypeScript errors and how to fix them
A list of common TypeScript errors and how to fix them.
Read more >Documentation - TypeScript 3.9
Imagine that we're writing a library in TypeScript and we're exporting some function called doStuff as part of our public API. The function's...
Read more >Vue 3 Setup: False errors reported by TypeScript language ...
Vue 3 Setup: False errors reported by TypeScript language service · 1. Enable "noUnusedLocals": true in tsconfig. · 2. Create a Vue 3...
Read more >Error Boundaries - React
In the past, JavaScript errors inside components used to corrupt React's internal ... If some component in one of these UI areas crashes,...
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 Free
Top 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

Hi guys, I found another solution, it’s not typescript version issue, try to add
"skipLibCheck": trueinside yourtsconfig.jsonfile incompilerOptionsfield, I think it will be solved.@KevinBon upgrade
@types/prop-typesto15.5.6, reinstall and see whether the problem solved.