Hi folks! I am working on a fork of datahub which ...
# troubleshoot
e
Hi folks! I am working on a fork of datahub which I recently updated. I am running into the following build error when running the command
./gradlew :datahub-frontend:dist -x yarnTest -x yarnLint
Copy code
[16:15:15] Generate [started]
[16:15:16] Generate [completed]
[16:15:16] Generate src/types.generated.ts [completed]
[16:15:16] Load GraphQL documents [completed]
[16:15:16] Generate [started]
[16:15:17] Generate [completed]
[16:15:17] Generate to src/ (using EXPERIMENTAL preset "near-operation-file") [completed]
[16:15:17] Generate outputs [completed]
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
<https://github.com/browserslist/browserslist#browsers-data-updating>
Failed to compile.

/Users/eyomi/datahub/datahub-web-react/src/App.tsx
TypeScript error in /Users/eyomi/datahub/datahub-web-react/src/App.tsx(109,10):
'ThemeProvider' cannot be used as a JSX component.
  Its instance type 'Component<ThemeProviderProps<DefaultTheme, DefaultTheme>, any, any>' is not a valid JSX element.
    The types returned by 'render()' are incompatible between these types.
      Type 'React.ReactNode' is not assignable to type 'import("/Users/eyomi/datahub/node_modules/@types/react/index").ReactNode'.  TS2786

    107 |
    108 |     return (
  > 109 |         <ThemeProvider theme={dynamicThemeConfig}>
        |          ^
    110 |             <Router>
    111 |                 <Helmet>
    112 |                     <title>{dynamicThemeConfig.content.title}</title>


info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
error Command failed with exit code 1.

> Task :datahub-web-react:yarnQuickBuild FAILED

FAILURE: Build failed with an exception.
Any idea what could be causing this issue?
b
hey Eric! hmm so I've never seen this, but it definitely seems like an issue with the typescript types for styled-components here. have you changed anything in your package.json in your fork?
also what version were you running before and what are you running now?