You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've migrated my workspace (containing angular apps, react and angular libs and a HTML/CSS library) by using nx migrate latest to the latest version of nx, angular etc.
All other tasks like linting, testing or building work fine but running nx run angular:build-storybook or nx run angular:storybook (where angular is really the name of our library project) do fail with the following output:
> nx run angular:build-storybook --verbose
> NX ui framework: @storybook/angular
Cannot read property 'targets' of undefined
TypeError: Cannot read property 'targets' of undefined
at readTargetOptions (\code\web-essentials\node_modules\@nrwl\devkit\src\executors\read-target-options.js:13:54)
at resolveCommonStorybookOptionMapper (\code\web-essentials\node_modules\@nrwl\storybook\src\executors\utils.js:142:60)
at storybookOptionMapper (\code\web-essentials\node_modules\@nrwl\storybook\src\executors\build-storybook\build-storybook.impl.js:28:140)
at \code\web-essentials\node_modules\@nrwl\storybook\src\executors\build-storybook\build-storybook.impl.js:13:24
at Generator.next (<anonymous>)
at fulfilled (\code\web-essentials\node_modules\tslib\tslib.js:114:62)
———————————————————————————————————————————————
> NX ERROR Running target "angular:build-storybook" failed
Failed tasks:
- angular:build-storybook
Hint: run the command with --verbose for more details.
Expected Behavior
Building or serving the storybook properly.
Steps to Reproduce
Using nx run angular:storybook or nx run angular:build-storybook
I've also deleted package-lock.json and cleaned node_modules (twice) so far.
Failure Logs
TypeError: Cannot read property 'targets' of undefined
at readTargetOptions (\code\web-essentials\node_modules\@nrwl\devkit\src\executors\read-target-options.js:13:54)
at resolveCommonStorybookOptionMapper (\code\web-essentials\node_modules\@nrwl\storybook\src\executors\utils.js:142:60)
at storybookOptionMapper (\code\web-essentials\node_modules\@nrwl\storybook\src\executors\build-storybook\build-storybook.impl.js:28:140)
at \code\web-essentials\node_modules\@nrwl\storybook\src\executors\build-storybook\build-storybook.impl.js:13:24
at Generator.next (<anonymous>)
at fulfilled (\code\web-essentials\node_modules\tslib\tslib.js:114:62)
I had a look at @nrwl\storybook\src\executors\utils.js:142:60 and there the problem was that it could not resolve the default project. So after adding "defaultProject": "angular" to my nx.json it works again.
Hi there @SeverinFriede ! Thanks for filing an issue. Can you check out this comment here? It is our intention for the error messaging to be better. At this point, specifying the projectBuildConfig will do the trick for you! :)
Let me know if you need anything else, and I can reopen the issue! :)
Current Behavior
I've migrated my workspace (containing angular apps, react and angular libs and a HTML/CSS library) by using
nx migrate latest
to the latest version of nx, angular etc.All other tasks like linting, testing or building work fine but running
nx run angular:build-storybook
ornx run angular:storybook
(whereangular
is really the name of our library project) do fail with the following output:Expected Behavior
Building or serving the storybook properly.
Steps to Reproduce
Using
nx run angular:storybook
ornx run angular:build-storybook
I've also deleted package-lock.json and cleaned node_modules (twice) so far.
Failure Logs
Environment
The text was updated successfully, but these errors were encountered: