Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][@storybook/theming][7.6.7]: Property '...' of type '...' is not assignable to 'string' index type 'CSSInterpolation' #25480

Closed
jlowcs opened this issue Jan 5, 2024 · 14 comments · Fixed by #26623

Comments

@jlowcs
Copy link

jlowcs commented Jan 5, 2024

Describe the bug

When running typescript on a project that uses @storybook/theming, I'm getting a bunch of these typing errors:

image
image

To Reproduce

simply open the node_modules/@storybook/theming/dist/create-8dd9d29b.d.ts file in vscode.

System

No response

Additional context

No response

@shilman
Copy link
Member

shilman commented Jan 6, 2024

Thanks for reporting! I am able to reproduce by opening create-8dd9d29b.d.ts.

How does this affect your project though? I created a fresh project and set skipLibCheck: false but did not see these errors when running tsc.

@jlowcs
Copy link
Author

jlowcs commented Jan 8, 2024

I'm not quite sure why it affects my project tbh, but it does 😅

@jlowcs
Copy link
Author

jlowcs commented Jan 8, 2024

Maybe because I am importing from @storybook/addon-docs (within my stories) which is itself importing from @storybook/theming?

@mayerraphael
Copy link

mayerraphael commented Jan 10, 2024

I had the same issue: I got this error when building the component library, which was weird because storybook should not be part of that build process, but both projects are in the same repository. I then added those storybook files (folders like .storybook and our custom addon/theming code) to the tsconfig.json "exclude" part, which solved the problem. Run and build storybook still works fine, i guess the cli of storybook uses an internal config.

@freed00m
Copy link

I have completely oposite problem as mayerraphael, I can build my library that is not part of storybook build. But my storybook build is completely broken.

I can stay on "@storybook/theming": "7.6.6" or skipLibCheck: true until fixed.

@bastiW
Copy link

bastiW commented Jan 15, 2024

Having this issue too after upgrade to 7.6.8.

I am using Angular 16

There are a lot of type errors. See below.

Probably this is related to
emotion-js/emotion#3136

ERROR in undefined undefined
node_modules/@storybook/components/dist/index.d.ts:919:97 - error TS2344: Type '"hidden" | "color" | "content" | "style" | "translate" | "disabled" | "slot" | "title" | "key" | "href" | "placeholder" | "target" | "type" | "defaultChecked" | "defaultValue" | ... 248 more ... | "onTransitionEndCapture"' does not satisfy the constraint '"hidden" | "color" | "content" | "style" | "translate" | "disabled" | "slot" | "title" | "ref" | "key" | "href" | "target" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 254 more ... | "onTransitionEndCapture"'.
  Type '"placeholder"' is not assignable to type '"hidden" | "color" | "content" | "style" | "translate" | "disabled" | "slot" | "title" | "ref" | "key" | "href" | "target" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 254 more ... | "onTransitionEndCapture"'.

919 declare const TabButton: _storybook_theming.StyledComponent<Pick<BarButtonProps | BarLinkProps, "href" | "target" | "type" | "slot" | "style" | "title" | "className" | "color" | "content" | "translate" | "hidden" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "key"> & React__default.RefAttributes<HTMLAnchorElement | HTMLButtonElement> & {
                                                                                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR in undefined undefined
node_modules/@storybook/components/dist/index.d.ts:926:98 - error TS2344: Type '"hidden" | "color" | "content" | "style" | "translate" | "disabled" | "slot" | "title" | "key" | "href" | "placeholder" | "target" | "type" | "defaultChecked" | "defaultValue" | ... 248 more ... | "onTransitionEndCapture"' does not satisfy the constraint '"hidden" | "color" | "content" | "style" | "translate" | "disabled" | "slot" | "title" | "ref" | "key" | "href" | "target" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | ... 254 more ... | "onTransitionEndCapture"'.

926 declare const IconButton: _storybook_theming.StyledComponent<Pick<BarButtonProps | BarLinkProps, "href" | "target" | "type" | "slot" | "style" | "title" | "className" | "color" | "content" | "translate" | "hidden" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "disabled" | "key"> & React__default.RefAttributes<HTMLAnchorElement | HTMLButtonElement> & {
                                                                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR in undefined undefined
node_modules/@storybook/theming/dist/create-8dd9d29b.d.ts:11473:11 - error TS2411: Property 'KhtmlBoxAlign' of type 'BoxAlign | readonly NonNullable<BoxAlign | undefined>[] | BoxAlign[] | undefined' is not assignable to 'string' index type 'CSSInterpolation'.

11473 interface CSSObject
                ~~~~~~~~~
ERROR in undefined undefined
node_modules/@storybook/theming/dist/create-8dd9d29b.d.ts:11473:11 - error TS2411: Property 'KhtmlBoxDirection' of type 'BoxDirection | readonly NonNullable<BoxDirection | undefined>[] | BoxDirection[] | undefined' is not assignable to 'string' index type 'CSSInterpolation'.

11473 interface CSSObject
                ~~~~~~~~~
ERROR in undefined undefined
node_modules/@storybook/theming/dist/create-8dd9d29b.d.ts:11473:11 - error TS2411: Property 'KhtmlBoxFlex' of type 'BoxFlex | ((string & {}) | Globals)[] | readonly NonNullable<BoxFlex | undefined>[] | undefined' is not assignable to 'string' index type 'CSSInterpolation'.

11473 interface CSSObject
                ~~~~~~~~~

@SantoJambit
Copy link

I'm having the same issue. setting skipLibCheck to true is not really an option, as it not only disables checks for node_modules, but also for local .d.ts files.

@dancrew32
Copy link

dancrew32 commented Jan 19, 2024

Here's our resolution that avoided managing specific library versions and avoided skipLibCheck: true. Skipping library checks is super dangerous btw, so please reconsider.

  1. npm i patch-package (https://www.npmjs.com/package/patch-package)
  2. Modify the offending *.d.ts files, e.g. node_modules/@storybook/components/dist/index.d.ts
  3. ./node_modules/.bin/patch-package @storybook/components
  4. Observe the .patch file generated in /patches
  5. Add a postinstall to your package.json scripts, e.g. "postinstall": "patch-package"
  6. Now when your team npm i, the post install should patch the type error
  7. Observe that your ./node_modules/.bin/tsc --noEmit no longer produces errors
  8. Set reminders to remove these patches when they're resolved by the maintainers

@SantoJambit
Copy link

I think this can be closed now. At least I don't get the errors anymore.

Copy link
Contributor

Hi there! Thank you for opening this issue, but it has been marked as stale because we need more information to move forward. Could you please provide us with the requested reproduction or additional information that could help us better understand the problem? We'd love to resolve this issue, but we can't do it without your help!

@github-actions github-actions bot added the Stale label Feb 23, 2024
@SantoJambit
Copy link

I think this can be closed now. At least I don't get the errors anymore.

I'll have to revert that comment. With 7.6.15 and 7.6.16 it worked, but with 7.6.17 it fails again

I'm suspecting, that you are generating the file node_modules/@storybook/theming/dist/create-<hash>.d.ts from some kind of definitions and that there have been differences when generating this file between the 7.6.16 and 7.6.17 release.

My best bet is: due to the not-pinned versions, the persons releasing the packages might have a different source for these and therefore some releases work fine, while others are broken. Maybe the persons releasing these two versions could come together and see what differences there are?

@SadScream
Copy link

SadScream commented Feb 26, 2024

@SantoJambit can you tell us your framework and its version and node version?

btw I also have this issue on node 18.18.0 and angular 17

@SantoJambit
Copy link

I'm using react.

    "@storybook/react": "7.6.17",
    "@types/react": "18.2.21",
    "react": "18.2.0",
    "node": "18.19.0"

@jy95
Copy link

jy95 commented Mar 2, 2024

I think this can be closed now. At least I don't get the errors anymore.

I'll have to revert that comment. With 7.6.15 and 7.6.16 it worked, but with 7.6.17 it fails again

I'm suspecting, that you are generating the file node_modules/@storybook/theming/dist/create-<hash>.d.ts from some kind of definitions and that there have been differences when generating this file between the 7.6.16 and 7.6.17 release.

My best bet is: due to the not-pinned versions, the persons releasing the packages might have a different source for these and therefore some releases work fine, while others are broken. Maybe the persons releasing these two versions could come together and see what differences there are?

Confirmed : I saw it in my repository ngx-json-schema-viewer. I had to do that to fix my workflow :

"@storybook/theming": "7.6.16"

jy95 added a commit to jy95/ngx-json-schema-viewer that referenced this issue Mar 2, 2024
* chore: npm update

* chore: npm outdated

* chore: npm outdated

* style: control flow

* style: finish migration

* fix: cherry pick storybook theming version

storybookjs/storybook#25480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

10 participants