finos / openfin-react-hooks

A collection of React Hooks built on top of the Openfin API - from Scott Logic
Apache License 2.0
48 stars 18 forks source link

Error on Demo Start #30

Closed shipswake closed 4 years ago

shipswake commented 5 years ago

I cloned the repo and followed the steps listed on the Readme

When I run Start in the Demo folder, I receive an error:

C:/Code/samples/Openfin/openfin-react-hooks/demo/src/App.tsx TypeScript error in C:/Code/samples/Openfin/openfin-react-hooks/demo/src/App.tsx(76,27): Expected 2 type arguments, but got 1. TS2558

74 | };
75 | 

76 | export default withRouter(App); | ^ 77 |

oriondean commented 5 years ago

Hi @shipswake , thanks for reporting this.

Do you happen to know what version of @types/react-router you have installed?

shipswake commented 4 years ago

"dependencies": { "classnames": "^2.2.6", "openfin-layouts": "^1.0.3", "openfin-react-hooks": "file:../", "prismjs": "^1.16.0", "react": "^16.8.6", "react-dom": "^16.8.6", "react-html-parser": "^2.0.2", "react-router-dom": "^5.0.0", "react-switch": "^5.0.0", "uuid": "^3.3.2" }

oriondean commented 4 years ago

What output do you get if you run npm ls @types/react-router-dom? I suspect that for some reason @types/react-router-dom v5.1.3 has been installed when the package-lock.json stipulates that v.5.0.0 should be installed. Did you happen to ignore the package-lock in any way when running npm install within the demo directory? If not, might be safer just to explicitly add @types/react-router as a dependency here