Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript errors after importing component #183

Open
omargon opened this issue Jan 25, 2024 · 1 comment
Open

Typescript errors after importing component #183

omargon opened this issue Jan 25, 2024 · 1 comment

Comments

@omargon
Copy link

omargon commented Jan 25, 2024

Hello! I used this package and its respective components for the first time in my project. I installed the package and compiled my project without any errors. Still, when I imported the component into one of my project components, I started getting the following Typescript compilation errors. I would appreciate any help you can give me.

../../node_modules/@types/node/console.d.ts(324,13): error TS2300: Duplicate identifier 'profile'.
../../node_modules/@types/node/console.d.ts(329,13): error TS2300: Duplicate identifier 'profileEnd'.
../../node_modules/react-highlight-within-textarea/lib/esm/createDecorator.d.ts(1,30): error TS2307: Cannot find module 'draft-js' or its corresponding type declarations.
../../node_modules/react-highlight-within-textarea/lib/esm/createDecorator.d.ts(2,27): error TS2307: Cannot find module './types' or its corresponding type declarations.
../../node_modules/react-highlight-within-textarea/lib/esm/createDecorator.d.ts(3,101): error TS2503: Cannot find namespace 'Draft'.
../../node_modules/react-highlight-within-textarea/lib/esm/DecoratorFactory.d.ts(2,64): error TS2307: Cannot find module 'draft-js' or its corresponding type declarations.
../../node_modules/react-highlight-within-textarea/lib/esm/DecoratorFactory.d.ts(3,59): error TS2307: Cannot find module './types' or its corresponding type declarations.
../../node_modules/react-highlight-within-textarea/lib/esm/DecoratorFactory.d.ts(6,9): error TS2300: Duplicate identifier 'profile'.
../../node_modules/react-highlight-within-textarea/lib/esm/DecoratorFactory.d.ts(7,9): error TS2300: Duplicate identifier 'profileEnd'.
../../node_modules/react-highlight-within-textarea/lib/esm/HighlightWithinTextarea.d.ts(2,53): error TS2307: Cannot find module 'draft-js' or its corresponding type declarations.
../../node_modules/react-highlight-within-textarea/lib/esm/HighlightWithinTextarea.d.ts(4,27): error TS2307: Cannot find module './types' or its corresponding type declarations.
../../node_modules/react-highlight-within-textarea/lib/esm/HighlightWithinTextareaCC.d.ts(3,24): error TS2307: Cannot find module 'draft-js' or its corresponding type declarations.
../../node_modules/react-highlight-within-textarea/lib/esm/index.d.ts(7,47): error TS2307: Cannot find module './types' or its corresponding type declarations.
../../node_modules/react-highlight-within-textarea/lib/esm/Selection.d.ts(1,29): error TS2307: Cannot find module 'draft-js' or its corresponding type declarations.
@bonafideduck
Copy link
Owner

This has a peer dependency. Did you npm install draft-js?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants