Skip to content

Could not find a declaration file for module 'history' #12153

@AlexanderDowerk

Description

@AlexanderDowerk

Windows 11 64bit

I just did a fresh install of this app and npm start threw the following error:

image

ERROR in src/index.tsx:4:38
TS7016: Could not find a declaration file for module 'history'. 'D:/Design und Development/epam react/my-app/node_modules/history/index.js' implicitly has an 'any' type.
  If the 'history' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/history'
    2 | import ReactDOM from 'react-dom';
    3 | import { Router } from 'react-router-dom';
  > 4 | import { createBrowserHistory } from 'history';
      |                                      ^^^^^^^^^
    5 | import { ContextProvider } from '@epam/uui';
    6 | import { Snackbar, Modals } from '@epam/uui-components';
    7 | import { ErrorHandler } from '@epam/loveship';

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions