Skip to content

npm install @types/react-router  #9488

Closed
@basarat

Description

@basarat

There is a bug in typings http://stackoverflow.com/questions/38157103/dtreact-router-error-ts2503-cannot-find-namespace-historymodule so I thought I'd give @types a go. However that didn't do a stellar job either.

npm install @types/react-router
tsc --init
tsc -p .

Errors:

node_modules/@types/react-router/index.d.ts(10,20): error TS2307: Cannot find module './lib/Router'.
node_modules/@types/react-router/index.d.ts(11,18): error TS2307: Cannot find module './lib/Link'.
node_modules/@types/react-router/index.d.ts(12,23): error TS2307: Cannot find module './lib/IndexLink'.
node_modules/@types/react-router/index.d.ts(13,27): error TS2307: Cannot find module './lib/IndexRedirect'.
node_modules/@types/react-router/index.d.ts(14,24): error TS2307: Cannot find module './lib/IndexRoute'.
node_modules/@types/react-router/index.d.ts(15,22): error TS2307: Cannot find module './lib/Redirect'.
node_modules/@types/react-router/index.d.ts(16,19): error TS2307: Cannot find module './lib/Route'.
node_modules/@types/react-router/index.d.ts(17,26): error TS2307: Cannot find module './lib/History'.
node_modules/@types/react-router/index.d.ts(18,23): error TS2307: Cannot find module './lib/Lifecycle'.
node_modules/@types/react-router/index.d.ts(19,26): error TS2307: Cannot find module './lib/RouteContext'.
node_modules/@types/react-router/index.d.ts(20,28): error TS2307: Cannot find module './lib/browserHistory'.
node_modules/@types/react-router/index.d.ts(21,25): error TS2307: Cannot find module './lib/hashHistory'.
node_modules/@types/react-router/index.d.ts(22,23): error TS2307: Cannot find module './lib/useRoutes'.
node_modules/@types/react-router/index.d.ts(23,30): error TS2307: Cannot find module './lib/RouteUtils'.
node_modules/@types/react-router/index.d.ts(24,31): error TS2307: Cannot find module './lib/PatternUtils'.
node_modules/@types/react-router/index.d.ts(25,27): error TS2307: Cannot find module './lib/RouterContext'.
node_modules/@types/react-router/index.d.ts(26,23): error TS2307: Cannot find module './lib/PropTypes'.
node_modules/@types/react-router/index.d.ts(27,19): error TS2307: Cannot find module './lib/match'.
node_modules/@types/react-router/index.d.ts(28,30): error TS2307: Cannot find module './lib/useRouterHistory'.
node_modules/@types/react-router/index.d.ts(29,33): error TS2307: Cannot find module './lib/createMemoryHistory'.

Where should people put @types issues? 🌹

Metadata

Metadata

Assignees

No one assigned

    Labels

    @typesRelates to working with .d.ts files (declaration/definition files) from DefinitelyTypedBugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions