#pnpx storybook@next upgrade --prerelease

71 messages · Page 1 of 1 (latest)

glossy cobalt
#

This command fails to updgrade my packages and package json.

This is the output

λ pnpm dlx  storybook@next upgrade --prerelease
.../Local/pnpm/store/v3/tmp/dlx-31560    | +624 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.../Local/pnpm/store/v3/tmp/dlx-31560    | Progress: resolved 624, reused 624, downloaded 0, added 624, done  
(node:30540) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 • Checking for latest versions of '@storybook/*' packagesinfo ,,| was unexpected at this time.
info
info ,,| was unexpected at this time.
info
 • Installing upgrades • Preparing to install dependencies. ✓


 • Installing dependenciesScope: all 8 workspace projects
Done in 3.6s
vapid forge
#

I'm not familiar with pnpm dlx, is it the same as pnpx?

#

Can you try npx instead? pnpm will still be used to install the actual dependencies

#

if you have a pnpm lockfile

glossy cobalt
#

just pnpx is just an alias for it

#

trying now

vapid forge
#

If this is a monorepo, you should run it from within the project that contains the storybook

glossy cobalt
#

thanks, yes i am doing that

#

looks like npx is working better so far

vapid forge
#

pnpx normally works too, not sure what the issue was there

glossy cobalt
#

even after npx, my package.json file isnt updated and Storybook 6.5.16 is running

#
λ npx  storybook@next upgrade --prerelease
Need to install the following packages:
  storybook@7.0.0-rc.2
Ok to proceed? (y) y
(node:3892) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)                                         
 • Checking for latest versions of '@storybook/*' packagesinfo ,,| was unexpected at this time.
info
info ,,| was unexpected at this time.
info
#

any other way i can find the correct versions?

vapid forge
#

@drowsy kernel is the upgrade command broken?

#

@glossy cobalt what version of node.js are you using?

drowsy kernel
#

@vapid forge is the upgrade command broken? I updated it recently & it's possible there's a regression cc @coral locust

#

@glossy cobalt do you have a public project i can look at?

coral locust
#

Please share how your package json dependencies look like, that would be fantastic

drowsy kernel
#

@glossy cobalt or can you tell me any more about your environment? npx sb@next info

coral locust
#

I just tried that same command in my project and the dependencies were upgraded (though with a canary release @drowsy kernel )

drowsy kernel
#

OOF i'll see what i can do about that canary release. thanks @coral locust

coral locust
#

Also worked for a 6.5 setting

glossy cobalt
coral locust
#

I just upgraded to use the exact same node version ☝️ and had a successful upgrade as well

drowsy kernel
#

must be a windows thing

coral locust
#

can do us a favor @glossy cobalt and run pnpm dlx storybook@7.0.0-beta.50 upgrade --prerelease

coral locust
#

and see if that gives a different result

#

aha

#

I see the problem

#

It seems like your project has an internal Storybook package, probably a utility wrapper of some sorts? @oen.web.vue/storybook

glossy cobalt
#

ah yes, I removed that before upgrading, sorry i forgot to send you the right version

#

2 secs

coral locust
#

It doesn't seem that you have any Storybook package (that we provide)

glossy cobalt
#

I do

coral locust
#

thanks a lot for going through this with us btw

glossy cobalt
coral locust
#

so you ran the upgrade command in the CWD that contains that package.json file?

glossy cobalt
#

No problem, Im going to hell and back with it at the moment. Always happy to try and make the experience better for the next person

coral locust
#

This is what I get when I use the command with your package.json in a pnpm project

glossy cobalt
#

yep, finally since using the new version provided, i get sometihng similar

coral locust
#

I guess I can at least point you to the right versions?

    "@storybook/addon-a11y": "^7.0.0-rc.2",
    "@storybook/addon-actions": "^7.0.0-rc.2",
    "@storybook/addon-essentials": "^7.0.0-rc.2",
    "@storybook/addon-interactions": "^7.0.0-rc.2",
    "@storybook/addon-links": "^7.0.0-rc.2",
    "@storybook/addon-notes": "^6.0.0-alpha.6",
    "@storybook/addon-postcss": "^3.0.0-alpha.1",
    "@storybook/builder-vite": "7.0.0-rc.2",
    "@storybook/csf-tools": "^7.0.0-rc.2",
    "@storybook/testing-library": "^0.0.14-next.1",
    "@storybook/theming": "^7.0.0-rc.2",
    "@storybook/vue3": "^7.0.0-rc.2",

And a few points:

  1. addon-notes is deprecated in favor of addon-docs, which is part of addon-essentials which you already have installed
  2. Given that you're using vite, I believe you can just get rid of addon-postcss
  3. I'm really curious what you use csf-tools for
glossy cobalt
#

Sidenote

  • storybook-vue3-router has not been updated to be compatible yet
coral locust
glossy cobalt
#

Yep I did already today 😉

glossy cobalt
#

For what its worth... you mentioned @oen.web.vue/storybook
The reason we had this in the past is that we have many projects using storybook, and we often ran into compatibility issues when using various versions and plugins, so we managed it in one single package...

{
  "name": "@oen.web.vue/storybook",
  "version": "1.1.1",
  "description": "Storybook & Plugins, bundled into a single package for convenience.",
  "keywords": [],
  "license": "UNLICENSED",
  "author": "Euronet Worldwide",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "@etchteam/storybook-addon-status": "^4.2.2",
    "@storybook/addon-a11y": "^6.5.15",
    "@storybook/addon-actions": "^6.5.15",
    "@storybook/addon-essentials": "^6.5.15",
    "@storybook/addon-interactions": "^6.5.15",
    "@storybook/addon-links": "^6.5.15",
    "@storybook/addon-notes": "^5.3.21",
    "@storybook/addon-postcss": "^2.0.0",
    "@storybook/builder-vite": "0.3.0",
    "@storybook/csf-tools": "^6.5.15",
    "@storybook/testing-library": "^0.0.13",
    "@storybook/theming": "^6.5.15",
    "@storybook/vue3": "^6.5.15"
  },
  "peerDependencies": {
    "storybook-vue3-router": "^2.3.1"
  },
  "publishConfig": {
    "registry": "https://artifactory.oneeuronet.com/artifactory/api/npm/oen-npm/"
  }
}

and installed that everywhere we needed it.

#

at the moment, I cant find any justification of having csf-tools, my best guess was we got it from one of the setup guides on the site or git at somepoint

#

Migration script is working much better on this version thanks

#

I have one issue with the CSF migration script & runtime on one of my stories, it complains about bad syntax, but I cant spot it anywhere

#

The line numbers in the error out dont match with the source file. any tips ?

coral locust
#

Migration script is working much better on this version thanks
Wait, did the migration work then?

#

The line numbers in the error out dont match with the source file. any tips ?
Let's sort out the first situation, but after please share a screenshot or any error message so we can assist you better

coral locust
#

How?

glossy cobalt
#

you sent a newer version, which worked
pnpm dlx storybook@7.0.0-beta.50 upgrade --prerelease

vapid forge
#

That's actually an older version 🙈

#

So maybe something did break in a newer version

glossy cobalt
#

ah, right ok. That one works anyhow

glossy cobalt
#

Running into some other issues, should I create new tickets?

#

Internal server error: At least one <template> or <script> is required in a single file component.

#

These are the main two issues which are coming up

#

Other that that, the Stroybook instance is rendering and looking hopeful

vapid forge
#

I'd recommend starting another thread with the details of your stories file

#

and the contents of your PMediaUpload

glossy cobalt
#

Well, its all of my files, like there is an issue with the loader or something
At least one <template> or <script> is required in a single file component.
At least one <template> or <script> is required in a single file component. (x2)
At least one <template> or <script> is required in a single file component. (x3)
At least one <template> or <script> is required in a single file component. (x4)
At least one <template> or <script> is required in a single file component. (x5)
At least one <template> or <script> is required in a single file component. (x6)
At least one <template> or <script> is required in a single file component. (x7)
At least one <template> or <script> is required in a single file component. (x8)
At least one <template> or <script> is required in a single file component. (x9)
At least one <template> or <script> is required in a single file component. (x10)
At least one <template> or <script> is required in a single file component. (x11)
At least one <template> or <script> is required in a single file component. (x12)
At least one <template> or <script> is required in a single file component. (x13)
At least one <template> or <script> is required in a single file component. (x14)
At least one <template> or <script> is required in a single file component. (x15)
At least one <template> or <script> is required in a single file component. (x16)

#

Do you know if the shared vite config is working with the likes of vitesse an uplugin-auto-imports and components?