I am trying to learn react and typescript. And would like to include material-ui in my project. From there homepage I am instructed to install react-tap-event-plugin, which I did and "node_modules/react-tap-event-plugin" does exist!
Now I am supposed to to do this:
import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();
but the typescript compile tells me, that it cannot find the module.
I tried different variants (using require, importing node_mdules/...), but nothing worked.
How do I set this up correctly?
This is my package.json:
{
  "private": true,
  "scripts": {
    "dev": "lite-server"
  },
  "dependencies": {
    "react": "^0.14.0",
    "react-dom": "^0.14.0",
    "fbjs": "^0.2.1",
    "react-tap-event-plugin": "0.2.0",
    "material-ui": "^0.14.0"
  }
}
                You need to install definition file (.d.ts) for react-tap-event-plugin. You can do it with typings by executing the following :
typings installed npm install typings --global
typings install dt~react-tap-event-plugin --saveAlso, be sure to reference typings/index.d.ts in tsconfig.json.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With