0

I installed and imported react-tilt following this page, but got below message and unable to use it. I am not sure what the message suggest. Does somebody know how to fix it? enter image description here

Patrick Roberts
  • 49,224
  • 10
  • 102
  • 153
David Z
  • 6,641
  • 11
  • 50
  • 101

1 Answers1

0

VS Code tell you to add manually the declaration for this module.

You can do it by creating a new file called index.d.ts inside the module (/node_modules/react-tilt) and add the following line inside it :

declare module 'react-tilt';

A way to do it faster, just copy paste the following line in your terminal.

If you're using bash or zsh :

cd ./node_modules/react-tilt && touch index.d.ts && echo "declare module 'react-tilt';" > index.d.ts

If you're using windows terminal :

cd ./node_modules/react-tilt && echo declare module 'react-tilt'; > index.d.ts
Konixy
  • 41
  • 5