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

Ensure storybook can build and that the built files can be served #9

Closed
3 tasks
michaelwooley opened this issue Jul 6, 2022 · 3 comments
Closed
3 tasks

Comments

@michaelwooley
Copy link
Owner

As of #7 , it looks like the storybook-build script runs to completion.

However, errors pop up when attempting to serve the files:

❯ npx http-server ./storybook-static
Starting up http-server, serving ./storybook-static

http-server version: 14.1.1

http-server settings: 
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://127.0.0.1:8080
  http://192.168.1.92:8080
Hit CTRL-C to stop the server

[2022-07-06T16:22:11.288Z]  "GET /" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
(node:26146) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `node --trace-deprecation ...` to show where the warning was created)
[2022-07-06T16:22:14.949Z]  "GET /" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
[2022-07-06T16:22:15.053Z]  "GET /favicon.ico" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
[2022-07-06T16:22:19.502Z]  "GET /7.480c60c60f21bf435941.manager.bundle.js" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
[2022-07-06T16:22:19.503Z]  "GET /7.480c60c60f21bf435941.manager.bundle.js" Error (404): "Not found"
[2022-07-06T16:22:19.538Z]  "GET /iframe.html?viewMode=story&id=*" "Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"
[2022-07-06T16:22:19.538Z]  "GET /iframe.html?viewMode=story&id=*" Error (404): "Not found"
  • Add build dir to gitignore
  • storybook-build runs to completion.
  • Built files can be served without incident
@gbkwiatt
Copy link

Any progress here ? Currently it does not work with latest sveltekit either.
Works when running dev storybook, but upon build - it does not generate correct build (missing iframe file)

@michaelwooley
Copy link
Owner Author

@gbkwiatt if you provide a sample repo + command output, I can look into it.

You should probably just try going through storybook directly: "Install Storybook".

See this PR:

svelte-add/svelte-add#220

In short, svelte-add isn't creating a seperate adder because SB has done that already. This appears to have occurred shortly after I set this repo down.

If it works, let me know and I'll archive this + add a pointer in readme.

@benmccann
Copy link
Collaborator

sb init works by setting up the SvelteKit framework for Storybook (https://github.com/storybookjs/storybook/tree/next/code/frameworks/sveltekit) and does work in build mode, so that's what I'd recommend

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

No branches or pull requests

3 participants