Hey everyone :)
I encountered a small TypeScript problem when working with react-click-to-component:
Describe the bug
Running the typescript compiler with "skipLibCheck": false will result in the following error:
node_modules/click-to-react-component/src/types.d.ts:1:34 - error TS2307: Cannot find module './src/ClickToComponent' or its corresponding type declarations.
To Reproduce
Steps to reproduce the behavior:
Setup a new React project with TypeScript and use
Make sure "skipLibCheck" is set to false
Run the TypeScript compiler
Expected behavior
No TSC errors should occur.
Screenshots
Additional context
I guess this happens, because the path reference inside of types.d.ts does not exist. Since this path should be resolved relative to the current file, it looks for a src dir inside of src and will not find that.
A possible fix would be to move types.d.ts to the root directory, or to fix the path.
Hey everyone :) I encountered a small TypeScript problem when working with react-click-to-component:
Describe the bug Running the typescript compiler with "skipLibCheck": false will result in the following error:
To Reproduce Steps to reproduce the behavior:
Expected behavior No TSC errors should occur.
Screenshots
Additional context I guess this happens, because the path reference inside of types.d.ts does not exist. Since this path should be resolved relative to the current file, it looks for a src dir inside of src and will not find that.
A possible fix would be to move types.d.ts to the root directory, or to fix the path.