1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Issue with ES modules import with Angular 19 and Storybook 9

Discussão em 'Angular' iniciado por TCH, Julho 10, 2025.

  1. TCH

    TCH Guest

    I migrated a project from Angular version 18 to Angular 19 and Storybook version 8 to Storybook 9.
    But I now face an error while starting Storybook:

    An unhandled exception occurred: Directory import 'D:\dev\myproject\node_modules\@storybook\angular\dist\builders\start-storybook' is not supported resolving ES modules imported from D:\dev\myproject\node_modules\@angular\cli\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js
    Did you mean to import D:/dev/myproject/node_modules/@storybook/angular/dist/builders/start-storybook/index.js?


    I found this github post that could explain the source of the issue. But even if I modify the file builders.json as suggested, I'm still unabled to run storybook. Instead, I get a second error:

    An unhandled exception occurred: require() of ES Module D:\dev\myproject\node_modules\find-up\index.js from D:\dev\myproject\node_modules\@storybook\angular\dist\builders\start-storybook\index.js not supported.
    Instead change the require of D:\dev\myproject\node_modules\find-up\index.js in D:\dev\myproject\node_modules\@storybook\angular\dist\builders\start-storybook\index.js to a dynamic import() which is available in all CommonJS modules.


    Until they provide a consistent solution, can anyone help me to get rid of this error ?

    Continue reading...

Compartilhe esta Página