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
asset path must start with the project source root #16979
Comments
Could this be an nx issue @mandarini @juristr ? |
I don't use nx and have the same issue. My main project is not in default directory. I started with empty workspace and added main project later. So I don't have src folder in root directory. Maybe this can be a reason. |
This doesn't seem to be a Nx problem. I don't have a quick fix. but I do know what is going on and I have a work around. Later I may have time to try and fix it, but if someone else wants to take care of it I will explain what seems to be the problem. Also, this should only be an issue with Angular >=12.2. I haven't tested with "@storybook/angular:start-storybook" or "@storybook/angular:build-storybook", but I don't think they are affected by this. It should only happen with the ProblemBefore Angular 12.2 Storybook called it's own For the newer Angular versions Storybook is relying on Angular to call it's own implementation, but the default I am not sure what the best solution is at the moment. Either find out how to correctly initialize a To make sure that const builderContext = getBuilderContext(_options);
builderContext.getProjectMetadata = () => {
// I hard-coded this path from the repro, but Storybook should know the actual sourceRoot to use.
return Promise.resolve({ sourceRoot: 'apps/user-app/src' });
}; That worked for an Angular 13 project, but it would be nice if a valid Work aroundAngular does not check to see if the path starts with the "assets": [
{
"glob": "**/favicon.ico",
"input": "apps/user-app/src",
"output": ""
},
{
"glob": "**/*",
"input": "apps/user-app/src/assets",
"output": "assets"
}
], |
workaround works, thx I thought the same error was already fixed once in a earlier version, but I can't find the github-issue |
Just wanted to add a standard & simple project that reproduces this issue. It happens in projects that contain both library and an app which is a fairly standard setup. |
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
|
Describe the bug
Using storybook in a nx workspace but without the nx plugins do not work anymore.
Before I updated from ng/nx 12 to 13 and storybook from 6.3 to 6.4 it worked.
To Reproduce
Clone this repo: https://github.com/admir86/inova-test and run
npm run storybook
System
The text was updated successfully, but these errors were encountered: