0

I'm new to React (and really web development) and I'm working in one of the starter projects. I have tried to install several npm packages to work with and they seem to be installing correctly. I can import the class into my Main.js file but when I hover over the import it says

Could not find a declaration file for module 'react-ui-cards'. '.../Gatsby/node_modules/react-ui-cards/index.js' implicitly has an 'any' type.

and it will throw an error if I try to build using these components

Ferran Buireu
  • 28,630
  • 6
  • 39
  • 67
dulongj
  • 307
  • 2
  • 17
  • Does this answer your question? [Could not find a declaration file for module 'module-name'. '/path/to/module-name.js' implicitly has an 'any' type](https://stackoverflow.com/questions/41292559/could-not-find-a-declaration-file-for-module-module-name-path-to-module-nam) – Jonathan Southern Sep 28 '21 at 17:00
  • No this did not help. I tried 'const ProductCard = require('react-ui-cards');' and I get the same error. I also tried creating my own .d.ts file and that didn't work either – dulongj Sep 28 '21 at 17:25
  • Now I'm getting 'window is not defined' – dulongj Sep 28 '21 at 17:33

0 Answers0