after doing "npx sb init" (react storybook): node_modules/react-router/index.d.ts:151:74 - error TS1110: Type expected error

Solution 1:

I also faced the same issue after integrating the story book.I was unable to run the application using yarn start.

I tried upgrading the typescript by using yarn upgrade typescript@latest (If you are using npm then use npm update typescript@latest)

After upgrading the typescript issue got resolved for me.

Thank you

Solution 2:

Did you try updating the typescript version? I had this issue after updating the typescript to the latest version "typescript": "4.5.4" fixed the above issue.

Note: But for me, this issue happened when I was trying to commit my project, the husky pre-commit hook started emitting this error.

https://docs.microsoft.com/en-us/answers/questions/666336/issus-in-react-router-when-import-any-component-in.html