question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:25 (7 by maintainers)

github_iconTop GitHub Comments

8reactions
kevinkamcommented, Oct 5, 2018

Hi guys, I found another solution, it’s not typescript version issue, try to add "skipLibCheck": true inside your tsconfig.json file in compilerOptions field, I think it will be solved.

5reactions
ycjcl868commented, Oct 5, 2018

@KevinBon upgrade @types/prop-types to 15.5.6, reinstall and see whether the problem solved.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found