Reputation: 983
Upon executing npm run storybook, the process fails with the following error:
ERR! => Could not get angular cli webpack config
Upvotes: 0
Views: 1478
Reputation: 83
I had the same isssue. The fix for me was to specifically name the paths of 'root' and 'sourceRoot' in the angular.json file.
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"storybook": {
"projectType": "application",
"sourceRoot": "projects/my-lib/src/lib",
"root": "projects/my-lib",
"architect": {
...
},
...
},
...
},
}
Upvotes: 2
Reputation: 983
This error usually happens upon additional source being added for assets in the angular.json file.
Fix:
Remove additional sources from assets under angular.json
Open package.json and edit the storybook script as follows:
"storybook": "npm run docs:json && start-storybook -p 6006 -s projects/"
Upvotes: -1