Skip to content

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

Closed

Description

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

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions