question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

has no exported member 'ChakraStyleProps'. when upgrading from 1.0.4 > 1.3.2

See original GitHub issue

I have just upgraded my package and TS is generating the following error:

Module '"../../../node_modules/@chakra-ui/react/dist/types"' has no exported member 'ChakraStyleProps'.

2 import { ChakraStyleProps, HStack, useBreakpointValue } from "@chakra-ui/react"

Full Error

components/pages/blog/Category.tsx:2:10 - error TS2305: Module '"../../../node_modules/@chakra-ui/react/dist/types"' has no exported member 'ChakraStyleProps'.

2 import { ChakraStyleProps, HStack, useBreakpointValue } from "@chakra-ui/react"
           ~~~~~~~~~~~~~~~~

theme/index.ts:26:34 - error TS2345: Argument of type '{ fonts: { demi: string; book: string; light: string; freight: string; }; fontWeights: { light: number; normal: number; medium: number; boldish: number; bold: number; }; fontSizes: { 13: string; 8: string; 5: string; ... 5 more ...; "-2": string; }; ... 6 more ...; components: { ...; }; }' is not assignable to parameter of type 'ThemeOverride'.
  Type '{ fonts: { demi: string; book: string; light: string; freight: string; }; fontWeights: { light: number; normal: number; medium: number; boldish: number; bold: number; }; fontSizes: { 13: string; 8: string; 5: string; ... 5 more ...; "-2": string; }; ... 6 more ...; components: { ...; }; }' is not assignable to type 'DeepThemeExtension<{ components: { Accordion: { parts: string[]; baseStyle: { container: { borderTopWidth: string; borderColor: string; _last: { borderBottomWidth: string; }; }; button: { fontSize: string; _focus: { boxShadow: string; }; _hover: { ...; }; _disabled: { ...; }; px: number; py: number; }; panel: { ...;...'.
    The types of 'breakpoints.toString' are incompatible between these types.
      Type '(() => string) & (() => string)' is not assignable to type 'string'.

26 export const theme = extendTheme(appTheme)
                                    ~~~~~~~~


Found 2 errors.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
husky > pre-commit hook failed (add --no-verify to bypass)

Theme File

import { extendTheme } from "@chakra-ui/react"

import * as themeConfig from "./themeConfig"

import { components } from "./components"
import { colors } from "./colors"
import { breakpoints } from "./breakpoints"
import { fontVariants } from "./fontVariants"

const styles = {
  global: {
    ...fontVariants,
    body: {
      ...fontVariants,
    },
  },
}

const appTheme = {
  styles,
  breakpoints,
  colors,
  components,
  ...themeConfig,
}
export const theme = extendTheme(appTheme)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
TimKolbergercommented, Feb 15, 2021
0reactions
segunadebayocommented, Mar 2, 2021

Yes, please replace the import to StyleProps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module has no exported member error in angular module
I've got the error "Module has no exported member" for my DialogComponent, UploadService, and UploadComponent.
Read more >
[Pro User] No exported member - Material Design for Bootstrap
Hi, I on index.ts file, under node_modules/ng-mdb-pro, the error below Error:(2, 9) TS2305: Module '../node_modules/ng-mdb-pro/free/index' has no exported ...
Read more >
'"react-router-dom"' has no exported member 'switch' - You.com
To solve “attempted import error: 'switch' is not exported from 'react-router-dom'.”, replace “<Switch>” with “<Routes>” and update the “Route” declaration to ...
Read more >
no exported member DialogsModule in Kendo UI for Angular
From the Dialogs Overview page of KendoUI with Angular, the dialog package should contain DialogModule and WindowModule.
Read more >
Module no exported member for new pages in ionic2 - ionic-v3
I have created a ionic2 porject and added a new page with the following command ionic g page new I have imported the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found