-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Upgrade to [email protected] does not work without vite builder #18286
Comments
@drik98 i'm confused. is something actually broken? what's going on is that we introduced a feature in 6.4 called automigrations. when you upgrade, it checks for some common configuration changes that needs to be fixed. if it finds something, it will ask you if you want to make the change. if it doesn't prompt you, it means that it didn't find anything that needs changing. |
It just stops with this step. No prompt or anything. No error message. No cvs changes, everything gets reset. Note that |
@drik98 I see, thanks for the clarification. Do you a have a reproduction repo you can share? If not, can you create one? See how to create a repro. Alternatively, perhaps you could go into |
Hello @shilman, I am not able to create a repro as it instantly works when selecting vue2 as a preset. But I was just able to to debug the The following happens in const builder = main.getFieldValue(['core', 'builder']);
// builder --> undefined
const builderName = typeof builder === 'string' ? builder : builder === null || builder === void 0 ? void 0 : builder.name;
// builderName --> undefined
if (builderName !== 'storybook-builder-vite') {
return null;
}
// as builderName is undefined" this evaluates to true and the function returns null. That seems to be where the upgrade process just stops.
|
Upon further investigation it seems in Just found out about the |
@IanVS is this related to the vite automigration? |
@yannbf @drik98 I think it's finished. It loops through all the automigrations and I guess the question is why doesn't the process exit after that? @yannbf I know you were going to change the logging behavior of |
Yeah, a "Done" would probably be a good addition even though there seems to be nothing wrong with automigrate (or vite, I think). The problem seems to lie somewhere else. When checking the code of the upgrade script the "automigrate" step seems to be the last IIRC. Still none of the I am just so confused as to why nothing happens with no error or termination message. |
Where and when exactly do the |
I really appreciate your help! storybook/lib/cli/src/upgrade.ts Line 166 in 4b849f9
|
No need to thank me. I greatly appreciate your work with storybook. It really makes developing and documenting much easier! So I managed to install version 6.5.4 and successfully build it. I could not do it with the "cli" but I think the problem lies with my machine.. What I found out is the command you linked above evaluates to npx npm-check-updates@latest /storybook/ --upgrade --target latest because Now the ncu command logs the following:
As you can maybe see above (issue description )that already happened from the beginning. But It also happens when I run the command on its own. So the problem does not lie with storybook but with either ncu or me. I did some googling and it seems to be a problem with npm itself (or perhaps in combination with fnm/nvm).
I installed npm-check-updates globally using yarn (normally not using yarn) and executed the command without npx npm-check-updates /storybook/ --upgrade --target latest and voila it works. |
The weird part for me is that npm-check-updates apparently encounters some kind of error ("Unexpected token '.'") but doesn't seem to throw an error after it, which then results in Storybook not being able to throw an error. |
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
|
Describe the bug
I am currently on version 6.4.22 of storybook. When trying to run
npx sb@latest upgrade
it tries to upgrade as usual but it suddenly stops without any further message at the step🔎 checking 'builder-vite'
.Note that I do not use the vite builder. Is this a breaking change? Do we have to move to vite in order to use newer versions of storybook?
To Reproduce
Please create a reproduction by running
npx sb@next repro
and following the instructions. Read our documentation to learn more about creating reproductions.Paste your repository and deployed reproduction here. We prioritize issues with reproductions over those without.
Currently no time for that. Sorry.
System
Please paste the results of
npx sb@next info
here.Additional context
Here is the complete log:
The text was updated successfully, but these errors were encountered: