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

[Bug]: npx sb@next init --skip-install is broken on new SvelteKit project #28819

Closed
benmccann opened this issue Aug 6, 2024 · 1 comment · Fixed by #28853
Closed

[Bug]: npx sb@next init --skip-install is broken on new SvelteKit project #28819

benmccann opened this issue Aug 6, 2024 · 1 comment · Fixed by #28853
Assignees

Comments

@benmccann
Copy link
Contributor

benmccann commented Aug 6, 2024

Describe the bug

Running npx sb@next init --skip-install on a new SvelteKit project is currently broken

Error: Cannot find @storybook/svelte/package.json, Error: Cannot find module '@storybook/svelte/package.json'
TypeError: (0 , i_.default) is not a function

The compiled code on that line is:

  let r = await (0, Ho.temporaryDirectory)(), s = Ho.versions[t] || await e.latestVersion(t), o = (0, i_.default)(t, s, {
    registry: await e.getRegistryURL()
  });

Which seems to correspond to getNpmTarballUrl in the source: https://github.com/storybookjs/storybook/blob/c0d3fdf50402aa00f36b10a5f52cd73c17e8b5f6/code/core/src/cli/dirs.ts#L20C15-L20C31

get-npm-tarball-url was moved around to different package.json files in #28519, so this is probably a regression from that PR.

I also noticed it was prebundled in an earlier PR, so perhaps there's some config that's not aligning: #28481

Reproduction link

happens with a brand new project

Reproduction steps

npm create svelte@latest myapp
cd myapp
npx sb@next init --skip-install

System

System:
    OS: Linux 6.8 Ubuntu 24.04 LTS 24.04 LTS (Noble Numbat)
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 20.13.1 - ~/.nvm/versions/node/v20.13.1/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 10.8.2 - ~/.nvm/versions/node/v20.13.1/bin/npm
    pnpm: 9.6.0 - ~/.nvm/versions/node/v20.13.1/bin/pnpm <----- active
  Browsers:
    Chrome: 127.0.6533.88

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants