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

[turborepo] Upgrade Storybook in example design-system to version 7 #4612

Closed
emilorol opened this issue Apr 17, 2023 · 1 comment · Fixed by #5884
Closed

[turborepo] Upgrade Storybook in example design-system to version 7 #4612

emilorol opened this issue Apr 17, 2023 · 1 comment · Fixed by #5884
Assignees
Labels
area: examples Improvements or additions to examples kind: bug Something isn't working

Comments

@emilorol
Copy link

What version of Turborepo are you using?

1.9.2

What package manager are you using / does the bug impact?

Yarn v1

What operating system are you using?

Mac

Describe the Bug

run: yarn run dev

In the output you can see:

@acme/docs:dev: info => Using prebuilt manager
@acme/docs:dev: ╭─────────────────────────────────────────────────────────────────────╮
@acme/docs:dev: │                                                                     │
@acme/docs:dev: │   Storybook 6.5.16 for React started                                │
@acme/docs:dev: │   206 ms for preview                                                │
@acme/docs:dev: │                                                                     │
@acme/docs:dev: │   Local:            http://localhost:6006/                          │
@acme/docs:dev: │   On your network:  http://192.168.2.2:6006/                        │
@acme/docs:dev: │                                                                     │
@acme/docs:dev: │   A new version (7.0.5) is available!                               │
@acme/docs:dev: │                                                                     │
@acme/docs:dev: │   Upgrade now: npx storybook@latest upgrade                         │
@acme/docs:dev: │                                                                     │
@acme/docs:dev: │   Read full changelog:                                              │
@acme/docs:dev: │   https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md   │
@acme/docs:dev: │                                                                     │
@acme/docs:dev: ╰─────────────────────────────────────────────────────────────────────╯

Attempting the upgrade npx storybook@latest upgrade produce the following:

➜  testing-turbo git:(main) npx storybook@latest upgrade
Need to install the following packages:
  storybook@7.0.5
Ok to proceed? (y) y
 • Checking for latest versions of '@storybook/*' packagesinfo ,Using yarn
info Upgrading /Users/MY-USER/workspace/testing-turbo/package.json
info 
info No dependencies.
info ,npm WARN exec The following package was not found and will be installed: npm-check-updates@16.10.8
info 
info ,Using yarn
info Upgrading /Users/MY-USER/workspace/testing-turbo/package.json
info 
info No dependencies.
info ,
 • Installing upgrades • Preparing to install dependencies. ✓


yarn install v1.22.19
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.69s.
. ✓
🔎 checking possible migrations..
[Storybook automigrate] ❌ Unable to determine storybook version so the automigrations will be skipped.
  🤔 Are you running automigrate from your project directory? Please specify your Storybook config directory with the --config-dir flag.
ERR! TypeError: Cannot convert undefined or null to object
ERR!     at Function.values (<anonymous>)
ERR!     at automigrate (/Users/MY-USER/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:321:743)
ERR!     at async doUpgrade (/Users/MY-USER/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:394:2893)
ERR!     at async withTelemetry (/Users/MY-USER/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/core-server/dist/index.js:35:3422)
ERR!     at async upgrade (/Users/MY-USER/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:394:3336)
ERR!  TypeError: Cannot convert undefined or null to object
ERR!     at Function.values (<anonymous>)
ERR!     at automigrate (/Users/MY-USER/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:321:743)
ERR!     at async doUpgrade (/Users/MY-USER/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:394:2893)
ERR!     at async withTelemetry (/Users/MY-USER/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/core-server/dist/index.js:35:3422)
ERR!     at async upgrade (/Users/MY-USER/.npm/_npx/bc7e1e37fcb46ffc/node_modules/@storybook/cli/dist/generate.js:394:3336)

attention => Storybook now collects completely anonymous telemetry regarding usage.
This information is used to shape Storybook's roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://storybook.js.org/telemetry

I tried a yarn run clean and also removed the yarn.lock file and manually updating the package.json file to this:

    "@storybook/addon-actions": "^7.0.5",
    "@storybook/addon-docs": "^7.0.5",
    "@storybook/addon-essentials": "^7.0.5",
    "@storybook/addon-links": "^7.0.5",
    "@storybook/builder-vite": "^7.0.5",
    "@storybook/react": "^7.0.5",
    "vite": "^3.0.0 || ^4.0.0"

this seems to work, but during install I get the following warning:

warning "eslint-config-acme > eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".

Note: a clean install of Storybook 7 in a very basic react repo creates the following Dev Dependencies:

$ npm install react react-dom
$ npx storybook@latest init --builder=vite

package.json snippet:

    "@storybook/addon-essentials": "^7.0.5",
    "@storybook/addon-interactions": "^7.0.5",
    "@storybook/addon-links": "^7.0.5",
    "@storybook/blocks": "^7.0.5",
    "@storybook/react": "^7.0.5",
    "@storybook/react-vite": "^7.0.5",
    "@storybook/testing-library": "^0.0.14-next.2",
    "prop-types": "^15.8.1",
    "storybook": "^7.0.5"

Expected Behavior

The new version of Storybook serving the components.

To Reproduce

Run yarn run dev

Reproduction Repo

No response

@emilorol emilorol added area: turborepo kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage labels Apr 17, 2023
@mehulkar mehulkar added area: examples Improvements or additions to examples and removed needs: triage New issues get this label. Remove it after triage labels May 23, 2023
@mehulkar
Copy link
Contributor

mehulkar commented May 23, 2023

Hey @emilorol, thanks for filing. We periodically try to update examples, but feel free to make a PR as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples kind: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants