#issues upgrading storybook in next app from 6.5 > 7

18 messages · Page 1 of 1 (latest)

raven thunder
#

after running npx storybook@latest upgrade

I'm getting errors


    node_modules/@storybook/addon-essentials/dist/measure/manager.mjs:1:11:
      1 │ export*from"@storybook/addon-measure/manager";
        ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-measure" here
  because it's not listed as a dependency of this package:

    ../../../.pnp.cjs:43:33:
      43 │           "packageDependencies": [\
         ╵                                  ~~

  You can mark the path "@storybook/addon-measure/manager" as external to exclude it
  from the bundle, which will remove this error.

✘ [ERROR] Could not resolve "@storybook/addon-controls/manager"

    node_modules/@storybook/addon-essentials/dist/controls/manager.mjs:1:11:
      1 │ export*from"@storybook/addon-controls/manager";
        ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-controls" here
  because it's not listed as a dependency of this package:

    ../../../.pnp.cjs:43:33:
      43 │           "packageDependencies": [\
         ╵                                  ~~

  You can mark the path "@storybook/addon-controls/manager" as external to exclude it
  from the bundle, which will remove this error.

✘ [ERROR] Could not resolve "@storybook/addon-toolbars/manager"

    node_modules/@storybook/addon-essentials/dist/toolbars/manager.mjs:1:11:
      1 │ export*from"@storybook/addon-toolbars/manager";
        ╵            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  The Yarn Plug'n'Play manifest forbids importing "@storybook/addon-toolbars" here
  because it's not listed as a dependency of this package:

    ../../../.pnp.cjs:43:33:
      43 │           "packageDependencies": [\
         ╵                                  ~~
remote yew
#

That's tough to read, could you wrap your code blocks in triple backticks?

raven thunder
#

we are using next monorepo , node v18.12.1, and yarn is 3.3.1 . The issue is that it works perfectly fine on one dev computer however throwing this error on another computer but the node, yarn , are the same we removed node_modules, deleted yarn.cash, install in with npx and manually with yarn, the error stays the same no matter what we are doing

remote yew
#

I would look for a .pnp.cjs file somewhere on the computer that is crashing. It could be in any folder between the project and root.

robust eagle
#

Hi! i'm working with Yana and getting these errors in my local machine, and i don't find any file with that extension...

remote yew
#

Is there a .pnp.js then?

#

Somewhere you have a file that is telling yarn to use it's plug-n-play mode

robust eagle
#

i found it

raven thunder
#

thanks !

robust eagle
#

not a easy one but it worked when i deleted that file

#

thanks @remote yew !

remote yew
#

yeah, those files are like poison, they apply to all files and projects underneath them, and it's easy to end up with one somewhere you don't expect

#

glad you found it and got it working!

raven thunder
#

thanks for explaining , what are the chances that yarn will install them in root, because we asked 4 devs to run it and almost everyone got it working

remote yew
#

Just have to be careful where you create your projects, always putting them in a subfolder, and making sure not to do it in your home directly