storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.4k stars 9.28k forks source link

Angular 13 build error: ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' #16896

Closed flashart92 closed 2 years ago

flashart92 commented 2 years ago

Describe the bug I just upgraded to Angular 13 and Storybook 6.4.7 now fails to build:

ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\pbkdf2\lib'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\pbkdf2\lib'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\pbkdf2\package.json (relative path: ./lib)
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\pbkdf2\lib\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\pbkdf2\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\randombytes'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\randombytes'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\randombytes\package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\randombytes\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\randomfill'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\randomfill'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\randomfill\package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\randomfill\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\readable-stream\package.json (relative path: ./lib)
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\readable-stream\package.json (relative path: ./lib)
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\readable-stream\package.json (relative path: ./lib)
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\internal\streams'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\internal\streams'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\readable-stream\package.json (relative path: ./lib/internal/streams)
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\internal\streams\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\internal\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\internal\streams'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\internal\streams'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\readable-stream\package.json (relative path: ./lib/internal/streams)
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\internal\streams\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\internal\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\lib\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\readable-stream\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\safer-buffer'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\safer-buffer'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\safer-buffer\package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\safer-buffer\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\@angular\animations\fesm2020'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist

Package versions: "@angular/cli": "13.0.3", "@angular/animations": "13.0.2", "@angular/cdk": "13.0.2", "@angular/common": "13.0.2", "@angular/compiler": "13.0.2", "@angular/core": "13.0.2", "@angular/forms": "13.0.2", "@angular/platform-browser": "13.0.2", "@angular/platform-browser-dynamic": "13.0.2", "@angular/router": "13.0.2", "@babel/plugin-transform-typescript": "7.16.1", "@compodoc/compodoc": "1.1.15", "@storybook/addon-actions": "6.4.7", "@storybook/addon-controls": "6.4.7", "@storybook/addon-essentials": "6.4.7", "@storybook/addon-jest": "6.4.7", "@storybook/addon-links": "6.4.7", "@storybook/angular": "6.4.7", "@storybook/builder-webpack5": "6.4.7", "@storybook/manager-webpack5": "6.4.7", "@babel/core": "7.16.0", "storybook-addon-grid": "0.0.13", "storybook-dark-mode": "1.0.8", "crypto-browserify": "3.12.0",

System Environment Info: System: OS: windows 11 CPU: AMD Ryzen 9 5900HX Binaries: Node: v14.17.6 npm: 6.14.15 Browsers: Chrome: 96.0.4664.45

I found the issues https://github.com/storybookjs/storybook/pull/16795 and https://github.com/webpack/webpack/issues/11467#issuecomment-691702706 but they didn't help me.

flashart92 commented 2 years ago

Has anyone been able to resolve the issue? This problem prevents us from upgrading to 13 angular and nx workspace 7 versions.

stale[bot] commented 2 years ago

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

flashart92 commented 2 years ago

The problem is relevant for version 6.5.0-alpha.15

ModuleNotFoundError: Module not found: Error: Can't resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\@angular\animations\fesm2020'
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\Compilation.js:2011:28
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:795:13
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:275:22
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:431:22
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:124:11
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:667:25
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:852:8
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:972:5
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\neo-async\async.js:6883:13
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\webpack\lib\NormalModuleFactory.js:955:45
    at finishWithoutResolve (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:296:11)
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:362:15
    at D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\enhanced-resolve\lib\Resolver.js:410:5
    at eval (eval at create (D:\PROJ\service-front\service-front\apps\storybook\browser\node_modules\@storybook\builder-webpack5\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:16:1)
resolve 'process/browser.js' in 'D:\PROJ\service-front\service-front\node_modules\@angular\animations\fesm2020'
  Parsed request is a module
  using description file: D:\PROJ\service-front\service-front\node_modules\@angular\animations\package.json (relative path: ./fesm2020)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      D:\PROJ\service-front\service-front\node_modules\@angular\animations\fesm2020\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\@angular\animations\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\@angular\node_modules doesn't exist or is not a directory
      D:\PROJ\service-front\service-front\node_modules\node_modules doesn't exist or is not a directory
      looking for modules in D:\PROJ\service-front\service-front\node_modules
        D:\PROJ\service-front\service-front\node_modules\process doesn't exist
      D:\PROJ\service-front\node_modules doesn't exist or is not a directory
      D:\PROJ\node_modules doesn't exist or is not a directory
      D:\node_modules doesn't exist or is not a directory
      looking for modules in D:/PROJ/service-front/service-front
        D:\PROJ\service-front\service-front\process doesn't exist
shilman commented 2 years ago

Shiver me timbers!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.18 containing PR #17249 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

shilman commented 2 years ago

Ermahgerd!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.14 containing PR #17249 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb upgrade
cruni505 commented 1 year ago

I was facing a similar issue in angular 13, I updated target to es2015 in tsconfig file and after that my App compiled correctly, hope this solution helps someone else.