storybookjs/storybook

addon-google-analytics: not compatible with Storybook 7 beta

Open

#20,366 opened on Dec 21, 2022

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (89,909 stars) (10,058 forks)batch import
api: addonshelp wanted

Description

Describe the bug

I upgraded to Storybook 7 beta 12 using the automatic method (npx storybook@next upgrade --prerelease) + automigrations. This gave me the following package.json dependencies (amongst others):

"storybook": "^7.0.0-beta.12",
"@storybook/angular": "^7.0.0-beta.12",
"@storybook/addons": "^7.0.0-beta.12",
"@storybook/addon-google-analytics": "^6.3.0-next.1",

I then reset my workspace (I guess I probably deleted package-lock.json) and tried to do npm i again. This is what I get:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my-project
npm ERR! Found: @storybook/addons@7.0.0-beta.13
npm ERR! node_modules/@storybook/addons
npm ERR!   dev @storybook/addons@"^7.0.0-beta.12" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @storybook/addons@"^6.1.14" from @storybook/addon-google-analytics@6.3.0-next.1
npm ERR! node_modules/@storybook/addon-google-analytics
npm ERR!   dev @storybook/addon-google-analytics@"^6.3.0-next.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

So I understand that addon-google-analytics does not yet support Storybook 7 beta.

System

System:
    OS: macOS 12.6
    CPU: (8) x64 Apple M1
  Binaries:
    Node: 16.19.0 - ~/.nvm/versions/node/v16.19.0/bin/node
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.0/bin/npm
  Browsers:
    Chrome: 108.0.5359.124
  npmPackages:
    @storybook/storybook-deployer: ^2.8.6 => 2.8.12

Contributor guide