react-simple-dropdown icon indicating copy to clipboard operation
react-simple-dropdown copied to clipboard

Could not find a declaration file for module 'react-simple-dropdown'.

Open henriquemota99 opened this issue 5 years ago • 4 comments

Hey. Im trying to import it to my project but I always get this error when importing on file: Could not find a declaration file for module 'react-simple-dropdown'.

And then while compiling

Failed to compile.

./src/App.js
Module not found: Can't resolve 'react-simple-dropdown' in '/app/src'

henriquemota99 avatar Jun 03 '20 10:06 henriquemota99

The first error sounds like an issue with TypeScript, which this library has no support for.

I'm not sure about the second issue. How are you attempting to import the module? What does your code look like?

takempf avatar Jun 03 '20 15:06 takempf

Currently I'm using a Docker file with Node to run the create-project-react. Its a simple project. I installed and I checked on node_modules that there is react-simple-dropdown and its all good.

But when I try to import the dropdown from the React-simple-dropdown I got these errors.. Its a clean project and I don't know why I got that error. What you want to see?

EDIT: Just using this after install I get these errors. import Dropdown, { DropdownTrigger, DropdownContent } from 'react-simple-dropdown'

henriquemota99 avatar Jun 03 '20 15:06 henriquemota99

What are you using to bundle the javascript? Something like webpack or rollup?

takempf avatar Jun 03 '20 17:06 takempf

I'm really new at this on React. I think I didn't setup nothing of that.. I'll search then how I can run javascript on React and I'll post feedback later. Really thanks!!

henriquemota99 avatar Jun 04 '20 12:06 henriquemota99