[
https://issues.apache.org/jira/browse/AMBARI-26261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wei-Chiu Chuang resolved AMBARI-26261.
--------------------------------------
Fix Version/s: AMBARI-26162 UI Modernization
Resolution: Fixed
> Ambari Admin React Build Fix
> ----------------------------
>
> Key: AMBARI-26261
> URL: https://issues.apache.org/jira/browse/AMBARI-26261
> Project: Ambari
> Issue Type: Bug
> Environment: NAME="Ubuntu"
> VERSION="20.04.6 LTS (Focal Fossa)"
> ID=ubuntu
> ID_LIKE=debian
> PRETTY_NAME="Ubuntu 20.04.6 LTS"
> node -v
> v20.17.0
> npm -v
> 10.8.2
> Reporter: Nikita Pande
> Assignee: Sandeep Kumar
> Priority: Major
> Fix For: AMBARI-26162 UI Modernization
>
> Attachments: Screenshot 2024-12-11 at 8.19.27 PM.png
>
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> Fix 'npm run build ' errors in ambari-admin reactjs code
> {code:java}
> src/tests/AddGroup.test.tsx:71:17 - error TS2769: No overload matches this
> call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward71 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/AddUser.test.tsx:70:17 - error TS2769: No
> overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward70 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/DeregisterRemoteCluster.test.tsx:38:15 -
> error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward38 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/EditGroup.test.tsx:69:17 - error TS2769: No
> overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward69 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/EditRemoteCluster.test.tsx:44:15 - error
> TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward44 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/EditRemoteCluster.test.tsx:102:17 - error
> TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward102 <Router
> history={history}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/EditUser.test.tsx:69:17 - error TS2769: No
> overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward69 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/ListUsersGroups.test.tsx:69:19 - error
> TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward69 <Router
> history={createMemoryHistory()}>
> ~~~~~~~
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/RegisterRemoteCluster.test.tsx:37:15 - error
> TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward37 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/RegisterRemoteCluster.test.tsx:74:17 - error
> TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward74 <Router
> history={history}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/RemoteClusters.test.tsx:40:15 - error TS2769:
> No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward40 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/RemoteClusters.test.tsx:92:17 - error TS2769:
> No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward92 <Router
> history={history}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/StackVersions/VersionsList.test.tsx:25:29 -
> error TS2307: Cannot find module '../../__mocks__/mockClusterInfo' or its
> corresponding type declarations.25 import mockClusterInfo from
> "../../__mocks__/mockClusterInfo";
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~src/tests/StackVersions/VersionsList.test.tsx:28:31
> - error TS2307: Cannot find module
> '../../screens/ClusterManagement/StackVersions/List' or its corresponding
> type declarations.28 import StackVersionsList from
> "../../screens/ClusterManagement/StackVersions/List";
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~src/tests/StackVersions/VersionsList.test.tsx:46:17
> - error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward46 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/StackVersions/VersionsList.test.tsx:76:17 -
> error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward76 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/StackVersions/VersionsList.test.tsx:88:17 -
> error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward88 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/StackVersions/VersionsList.test.tsx:103:17 -
> error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward103 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/StackVersions/VersionsList.test.tsx:118:17 -
> error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward118 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/StackVersions/VersionsList.test.tsx:139:17 -
> error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward139 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/StackVersions/VersionsList.test.tsx:152:17 -
> error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward152 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'src/tests/StackVersions/VersionsList.test.tsx:170:17 -
> error TS2769: No overload matches this call.
> Overload 1 of 2, '(props: RouterProps): Router', gave the following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward
> Overload 2 of 2, '(props: RouterProps, context: any): Router', gave the
> following error.
> Type 'MemoryHistory' is missing the following properties from type
> 'History<unknown>': length, goBack, goForward170 <Router
> history={createMemoryHistory()}>
> ~~~~~~~ node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> node_modules/@types/react-router/index.d.ts:107:5
> 107 history: H.History;
> ~~~~~~~
> The expected type comes from property 'history' which is declared here on
> type 'IntrinsicAttributes & IntrinsicClassAttributes<Router> &
> Readonly<RouterProps>'
> Found 22 errors.{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]