'Typescript error TS1127 when running docker
At first, I thought it was a UNICODE issue so I made new files and re-wrote the code still getting the errors...
I am trying to run my docker and getting these errors:
ERROR in node_modules/pdfjs-dist/types/src/display/api.d.ts(1431,5): error TS1127: Invalid character.
web-app_1 | node_modules/pdfjs-dist/types/src/display/metadata.d.ts(10,5): error TS1127: Invalid character.
web-app_1 | node_modules/redux-thunk/es/index.d.ts(1,13): error TS1005: '=' expected.
web-app_1 | node_modules/redux-thunk/es/index.d.ts(1,40): error TS1005: ';' expected.
web-app_1 | node_modules/redux-thunk/es/index.d.ts(2,13): error TS1005: '=' expected.
web-app_1 | node_modules/redux-thunk/es/index.d.ts(2,38): error TS1005: ';' expected.
web-app_1 | node_modules/redux-thunk/es/index.d.ts(3,1): error TS1128: Declaration or statement expected.
web-app_1 | node_modules/redux-thunk/es/index.d.ts(3,13): error TS1005: ';' expected.
web-app_1 | node_modules/redux-thunk/es/index.d.ts(3,87): error TS1005: ';' expected.
I can't find the api.d.ts and metadata.d.ts files. However, the index.d.ts looks like this:
import {Middleware, Action, AnyAction} from "redux";
export interface ThunkDispatch<S, E, A extends Action> {
<T extends A>(action: T): T;
<R>(asyncAction: ThunkAction<R, S, E, A>): R;
}
export type ThunkAction<R, S, E, A extends Action> = (
dispatch: ThunkDispatch<S, E, A>,
getState: () => S,
extraArgument: E
) => R;
export type ThunkMiddleware<S = {}, A extends Action = AnyAction, E = undefined> = Middleware<ThunkDispatch<S, E, A>, S, ThunkDispatch<S, E, A>>;
declare const thunk: ThunkMiddleware & {
withExtraArgument<E>(extraArgument: E): ThunkMiddleware<{}, AnyAction, E>
}
export default thunk;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
