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

Looks like @storybook/web-components@7.0.0-alpha.35 didn't get released properly (package.json isn't updated) #19426

Closed
halkeye opened this issue Oct 10, 2022 · 3 comments

Comments

@halkeye
Copy link
Contributor

halkeye commented Oct 10, 2022

Describe the bug

If you look at the version tagged @ https://github.com/storybookjs/storybook/blob/v7.0.0-alpha.35/code/presets/web-components-webpack/package.json and the dist that was release, you'll see a discrepancy (exports['./preset'] is missing.

To Reproduce

npm view @storybook/web-components@7.0.0-alpha.35 dist.tarball | xargs curl -qs | tar -xz package/package.json -O | jq '.exports'
{
  ".": {
    "require": "./dist/index.js",
    "import": "./dist/index.mjs",
    "types": "./dist/index.d.ts"
  },
  "./preview": {
    "require": "./dist/config.js",
    "import": "./dist/config.mjs",
    "types": "./dist/config.d.ts"
  },
  "./package.json": {
    "require": "./package.json",
    "import": "./package.json",
    "types": "./package.json"
  }
}

System

I don't think really applicable

npx sb@next info

Environment Info:

  System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  Binaries:
    Node: 16.13.1 - ~/.asdf/installs/nodejs/16.13.1/bin/node
    Yarn: 1.22.15 - ~/.asdf/installs/nodejs/16.13.1/bin/yarn
    npm: 8.19.2 - ~/go/src/github.com/halkeye/jenkins-io-components/node_modules/.bin/npm
  Browsers:
    Chrome: 105.0.5195.102
  npmPackages:
    @storybook/addon-actions: ^7.0.0-alpha.35 => 7.0.0-alpha.35
    @storybook/addon-essentials: ^7.0.0-alpha.35 => 7.0.0-alpha.35
    @storybook/addon-events: ^6.3.0-alpha.21 => 6.3.0-alpha.21
    @storybook/addon-links: ^7.0.0-alpha.35 => 7.0.0-alpha.35
    @storybook/addon-postcss: ^3.0.0-alpha.1 => 3.0.0-alpha.1
    @storybook/builder-webpack4: ^6.5.13-alpha.0 => 6.5.13-alpha.0
    @storybook/builder-webpack5: ^7.0.0-alpha.35 => 7.0.0-alpha.35
    @storybook/cli: ^7.0.0-alpha.35 => 7.0.0-alpha.35
    @storybook/manager-webpack4: ^6.5.13-alpha.0 => 6.5.13-alpha.0
    @storybook/manager-webpack5: ^6.5.0-rc.1 => 6.5.0-rc.1
    @storybook/web-components: ^7.0.0-alpha.35 => 7.0.0-alpha.35

Additional context

WARN   Failed to load preset: "@storybook/web-components/preset"
ERR! Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './preset' is not defined by "exports" in /home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/web-components/package.json
ERR!     at __node_internal_captureLargerStackTrace (node:internal/errors:464:5)
ERR!     at new NodeError (node:internal/errors:371:5)
ERR!     at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
ERR!     at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
ERR!     at resolveExports (node:internal/modules/cjs/loader:482:36)
ERR!     at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
ERR!     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19)
ERR!     at require (node:internal/modules/cjs/helpers:102:18)
ERR!     at $ (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:6:16)
ERR!     at fr (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:20:118)
ERR!     at ye (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:20:207)
ERR!     at /home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:22:323
ERR!     at Array.map (<anonymous>)
ERR!     at A (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:22:310)
ERR!     at be (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:22:821)
ERR!     at pr (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:22:1117)
ERR!     at buildDevStandalone (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-server/dist/cjs/build-dev.js:105:54)
ERR!     at async un (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/cli/dist/generate.js:258:1900)
ERR!  Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './preset' is not defined by "exports" in /home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/web-components/package.json
ERR!     at __node_internal_captureLargerStackTrace (node:internal/errors:464:5)
ERR!     at new NodeError (node:internal/errors:371:5)
ERR!     at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
ERR!     at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
ERR!     at resolveExports (node:internal/modules/cjs/loader:482:36)
ERR!     at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
ERR!     at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
ERR!     at Function.Module._load (node:internal/modules/cjs/loader:778:27)
ERR!     at Module.require (node:internal/modules/cjs/loader:1005:19)
ERR!     at require (node:internal/modules/cjs/helpers:102:18)
ERR!     at $ (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:6:16)
ERR!     at fr (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:20:118)
ERR!     at ye (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:20:207)
ERR!     at /home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:22:323
ERR!     at Array.map (<anonymous>)
ERR!     at A (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:22:310)
ERR!     at be (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:22:821)
ERR!     at pr (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-common/dist/index.js:22:1117)
ERR!     at buildDevStandalone (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/core-server/dist/cjs/build-dev.js:105:54)
ERR!     at async un (/home/halkeye/go/src/github.com/halkeye/jenkins-io-components/node_modules/@storybook/cli/dist/generate.js:258:1900) {
ERR!   code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
ERR! }
info => Loading presets

I might be running the new alpha branch wrong, but its still a weird inconsistency.

@halkeye
Copy link
Contributor Author

halkeye commented Oct 11, 2022

Oh i see a @storybook/web-components-webpack5 which i think is the right package now, but its a little confusing how its that (name isn't updated)

@shilman
Copy link
Member

shilman commented Oct 11, 2022

@halkeye please see the MIGRATION notes for more info on this:

https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#framework-field-mandatory

We're still working on the migration path to 7.0, which contains big breaking changes, so that's why it's tagged as "alpha"

@halkeye
Copy link
Contributor Author

halkeye commented Oct 11, 2022

Oh cool. I think this can be closed. I was poking around trying out the webpack5 upgrade and i think i didn't realize until much later i also did the storybook 7 alpha. That migration dock is super useful.

I think this can be closed though.

@halkeye halkeye closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants