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

Error with custom config file not placed in root directory #1008

Open
navin-moorthy opened this issue Jun 18, 2024 · 0 comments
Open

Error with custom config file not placed in root directory #1008

navin-moorthy opened this issue Jun 18, 2024 · 0 comments
Labels
bug Classification: Something isn't working CLI needs triage Tracking: Issue needs confirmation

Comments

@navin-moorthy
Copy link

Bug report

We are managing 4 Storybook Projects in a single repo, so we needed 4 config file eg., --config-file storybook/bc-chromatic.config.json which is stored under storybook folder.

We am aware that if we provide a wrong path in our main.js file, we will get an early error like this.

main.js

import path from "path";

/** @type { import('@storybook/react-vite').StorybookConfig } */
const config = {
	stories: ["../../../resources/src/**/*.story.jsx"],
	framework: {
		name: "@storybook/react-vite",
	},
	addons: [
		{
			name: "@chromatic-com/storybook",
			options: {
				configFile: "storybook/bc-chromatic.config.json",
			},
		},
	],
};

export default config;

For Eg.,
image

But instead, I get this error after booting up the storybook but prevents us from running the Visual Test. It's looking for the file bc-chromatic.config.json in the root directory instead of the configFile: "storybook/bc-chromatic.config.json",
image

We currently resolved this by moving the config file to the root directory, but this needs to be fixed. Because we have 4 similar config files in our root directory now.

@navin-moorthy navin-moorthy added bug Classification: Something isn't working needs triage Tracking: Issue needs confirmation labels Jun 18, 2024
@codykaup codykaup removed the Migrated label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Classification: Something isn't working CLI needs triage Tracking: Issue needs confirmation
Projects
None yet
Development

No branches or pull requests

2 participants