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

This project no longer runs correctly #13

Closed
ay13 opened this issue Oct 19, 2023 · 1 comment
Closed

This project no longer runs correctly #13

ay13 opened this issue Oct 19, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ay13
Copy link

ay13 commented Oct 19, 2023

Describe the bug

When I start this project to demo its capabilities, it does not proxy the rendered markup into storybook.

I have the Django project running and the storybook running.

Environment

Mac Sonoma
Python 3.9.18

Steps to reproduce

(Write your steps here:)

  1. Clone or download code for project
  2. python -m venv --prompt sb .venv
  3. source .venv/bin/activate
  4. pip install -r requirements.txt
  5. npm install
  6. python manage.py runserver 0:8001
  7. npm run start

Expected behavior

I expected to be able to navigate the Storybook and see the components

Actual behavior

I receive this error in Storybook Error occurred while trying to proxy: localhost:6006/pattern-library/api/v1/render-pattern

image

@ay13 ay13 added the bug Something isn't working label Oct 19, 2023
@thibaudcolas
Copy link
Member

Hi @ay13, I’ve been through those exact steps and the project still runs the same as ever. Exact steps as yours. Thinking of possible issues, it could be the Node version you’re using? See nodejs/node#40537

Django’s development server only serves on IPv4 I believe, while Node will be resolving localhost to an IPv6 address.

If this is the possible culprit, try on a recent Node version and see what happens? You can also export TEST_ORIGIN=http://127.0.0.1:8001 to force Node querying the IPv4 address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants