#Usage example of `npx storybook@latest upgrade` with `config-dir` flag

3 messages · Page 1 of 1 (latest)

icy valley
#

Hello! I'm trying to upgrade storybook in a monorepo where the storybook config is in its own package located at project_root/packages/storybook/src, and its package.json is one level above at project_root/packages/storybook. What would the npx storybook@latest upgrade command look like in this case? I've tried different combinations pointing directly at the /src and /storybook subfolders and I'm still getting the message: "Unable to determine storybook version so the automigrations will be skipped.
🤔 Are you running automigrate from your project directory? ..."

I also tried using both relative and absolute paths, but with no success. Examples of what I tried:
npx storybook@latest upgrade --config-dir /Users/me/Code/project_root/packages/storybook/
npx storybook@latest upgrade --config-dir /Users/me/Code/project_root/packages/storybook/src
npx storybook@latest upgrade --config-dir packages/storybook/src/
npx storybook@latest upgrade --config-dir packages/storybook/

Thanks in advance.

icy valley
#

Update: I made it work by running the command from the package folder project_root/packages/storybook exactly like this: npx storybook@latest upgrade --config-dir src/

#

and since I'm using yarn, after the whole auto migration was done I had to remember to go the my monorepo's root and run yarn install