Storybook run fail on workspace basing on workspace.json instead of angular.json due to lack of some config entries
See original GitHub issueCurrent Behavior
Workspace has only workspace.json file (no angular.json)
> nx run swo-ng-checkbox-wrapper:storybook
info => Loading presets
info => Loading 1 config file in "/Users/krzysztoforkiszswo/dev/orkisz/ng-react-mix-nx/libs/swo-ng/checkbox-wrapper/.storybook"
info => Loading 8 other files in "/Users/krzysztoforkiszswo/dev/orkisz/ng-react-mix-nx/libs/swo-ng/checkbox-wrapper/.storybook"
info => Adding stories defined in "/Users/krzysztoforkiszswo/dev/orkisz/ng-react-mix-nx/libs/swo-ng/checkbox-wrapper/.storybook/main.js"
info => Found custom tsconfig.json
info => Using implicit CSS loaders
info => Loading angular-cli config
info => Using angular project "swo-ng-progress-bar:build" for configuring Storybook
ERR! => Could not get angular cli webpack config
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
Broken build, fix the error above.
You may need to refresh the browser.
βββββββββββββββββββββββββββββββββββββββββββββββ
> NX ERROR Running target "swo-ng-checkbox-wrapper:storybook" failed
Failed tasks:
- swo-ng-checkbox-wrapper:storybook
Hint: run the command with --verbose for more details.
Take a look that it also tries to invoke default project build, not those Iβm interested in
Expected Behavior
Storybook runs normally
Steps to Reproduce
In this commit I added some necessary props to workspace.json: https://github.com/orkisz/ng-react-mix-nx/tree/b5d28bcde242041267debdede95c9698034d5c91 just checking out previous commit will show the error. I assume Storybook integration needs info that exists in angular.json (tsConfig and angularBrowserTarget) but because of some convention is not necessary for NX
Failure Logs
Environment
Node : 14.17.6 OS : darwin x64 yarn : 1.22.11
nx : 12.9.0 @nrwl/angular : 12.9.0 @nrwl/cli : 12.9.0 @nrwl/cypress : 12.9.0 @nrwl/devkit : 12.9.0 @nrwl/eslint-plugin-nx : 12.9.0 @nrwl/express : Not Found @nrwl/jest : 12.9.0 @nrwl/linter : 12.9.0 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : 12.9.0 @nrwl/nx-cloud : Not Found @nrwl/react : 12.9.0 @nrwl/schematics : Not Found @nrwl/tao : 12.9.0 @nrwl/web : 12.9.0 @nrwl/workspace : 12.9.0 @nrwl/storybook : 12.9.0 @nrwl/gatsby : Not Found typescript : 4.3.5
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:15 (5 by maintainers)
@junekpavel thanks, will have a look π
Hey @juristr and others, Iβm having exactly same issue.
After some investigations, I found out, the issue isnβt probably related to
workspace.json
file name, but rather to the buildable libraries.I prepared the repo with minimal reproduction https://github.com/junekpavel/nx-sb-demo, including all commands I run to generate it. Notice the
--buildable
flags when generating libraries - if you run generate libraries without them, the storybook is working.