score:23

Accepted answer

When installing @types/history you are just providing typescript compiler with type information about history package. Not the package itself. See for example this thread for some details.

Therefore - you must install history package in order to use it:

$ npm install --save history

See more info about its usage at their github rep.

score:4

try to install history and react router dom package using npm

npm install --save history
npm install react-router-dom --save 

Related Query

More Query from same tag