Closed flashart92 closed 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.
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!
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
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.
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
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.
Describe the bug I just upgraded to Angular 13 and Storybook 6.4.7 now fails to build:
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.