#Getting Error when trying to add testing library

37 messages · Page 1 of 1 (latest)

dry hearth
quaint rockBOT
#
ShashiG#9418 has been warned

Reason: @mentioning people

gleaming solstice
#

Hey @dry hearth, I’m sorry that you’re having problems. However, please don’t at mention folks like that. We have people all around the world on the server so you’re potentially pinging people in the middle of the night

#

I’m just about to head to bed but I’ll have a look at how to help in the morning 🙂

dry hearth
dry hearth
gleaming solstice
#

It's okay 🙂 I get that it can be frustrating when you're stuck on the same error for a long time

autumn inlet
#

i appreciate it too!

gleaming solstice
#

@dry hearth I have a feeling that this might be a clashing of versions here 🤔

#

What version of storybook are you using?

dry hearth
gleaming solstice
#

Ah perfect 🙂 i thought that it might be but wanted to be sure

#

What package manager are you using? npm, yarn, pnpm?

gleaming solstice
#

perfect! can you run yarn why @storybook/client-logger and paste the results to me?

dry hearth
gleaming solstice
#

Sorry can you paste the text? it's easier to look through

dry hearth
#

Found multiple versions of @stoybook/channel-postmessage

#

Which is also causing issue during build

#

ModuleDependencyError: export 'createChannel' (imported as 'createChannel') was not found in '@storybook/channel-postmessage' (possible exports: KEY, PostmsgTransport, default)

#

=======================

#

yarn why @storybook/channel-postmessage
yarn why v1.22.19
[1/4] 🤔 Why do we have the module "@storybook/channel-postmessage"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "@storybook/[email protected]"
info Has been hoisted to "@storybook/channel-postmessage"
info Reasons this module exists

  • Hoisted from "@storybook#builder-webpack5#@storybook#channel-postmessage"
  • Hoisted from "@storybook#builder-webpack5#@storybook#archived-client-api#@storybook#channel-postmessage"
  • Hoisted from "@storybook#manager-webpack5#@storybook#core-client#@storybook#channel-postmessage"
  • Hoisted from "@storybook#builder-webpack5#@storybook#preview-web#@storybook#channel-postmessage"
  • Hoisted from "@storybook#archived-react#@storybook#core#@storybook#core-server#@storybook#builder-webpack4#@storybook#channel-postmessage"
    info Disk size without dependencies: "84KB"
    info Disk size with unique dependencies: "13.75MB"
    info Disk size with transitive dependencies: "19.86MB"
    info Number of shared dependencies: 23
    => Found "@storybook/preview-api#@storybook/[email protected]"
    info This module exists because "@storybook#instrumenter#@storybook#preview-api" depends on it.
    info Disk size without dependencies: "36KB"
    info Disk size with unique dependencies: "668KB"
    info Disk size with transitive dependencies: "19.84MB"
    info Number of shared dependencies: 24
    ✨ Done in 0.53s.
gleaming solstice
#

yeah, there is multiple versions of the logger too

#

I believe the testing library needs to be downgraded to a version that uses sb 6 or upgrade to sb 7 to solve the issue

dry hearth
gleaming solstice
dry hearth
#

Thanks for your quick support

#

Issue is resolved 🙏

#

😀

autumn inlet
#

that's fantastic to hear!! 🥳

gleaming solstice
#

🎉 amazing! I’m glad to hear that we got it figured out 🥳