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] should not require main.js on standalone remote mode #451

Closed
zb-sj opened this issue Apr 17, 2024 · 1 comment · Fixed by #464
Closed

[bug] should not require main.js on standalone remote mode #451

zb-sj opened this issue Apr 17, 2024 · 1 comment · Fixed by #464

Comments

@zb-sj
Copy link

zb-sj commented Apr 17, 2024

Describe the bug

Hi, I'm trying to leverage test-runner to do some e2e screenshot generation on aws lambda.

As far as I know, main.js configurations aren't or shouldn't be required for remote standalone testing that was implemented at #31

In fact, I could run my test just fine with random main.js like:

// copied straight from the document
const config = {
  // Required
  // Replace your-framework with the framework you are using (e.g., react-webpack5, vue3-vite)
  framework: '@storybook/your-framework',
  stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
  // Optional
  addons: ['@storybook/addon-essentials'],
  docs: {
    autodocs: 'tag',
  },
  staticDirs: ['../public'],
};
export default config;

This is the stderr if no main.js is provided:

[test-storybook] Detected a remote Storybook URL, running in index json mode. To disable this, run the command again with --no-index-json

[test-storybook] Could not load main.js in .storybook. Is the ".storybook" config directory correct? You can change it by using --config-dir <path-to-dir>

To Reproduce
Steps to reproduce the behavior:

  1. Run npx test-storybook --url $STORYBOOK_URL --no-cache on any non-storybook environment

Expected behavior

it should run just fine without .storybook/main.js

Additional context

#23

@yannbf
Copy link
Member

yannbf commented May 17, 2024

Hey @zb-sj well said, that makes total sense and is a bug. I'm fixing it! Thanks for reporting!

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

Successfully merging a pull request may close this issue.

2 participants