storybookjs / storybook

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

Stories breaking after upgrade to 6.3.8 and webpack 5 #16023

Closed pramodx closed 1 year ago

pramodx commented 2 years ago

Describe the bug Describe the bug I am working on a hybrid Angular+AngularJS app which is using template: require('./template.html') to load the HTMLs. It was all working fine with sb5 and webpack4 but recently I updated to sb@6.3.8 with webpack and now the template loading doesn't seem to work. If I change the template property to templateUrl: './template.html', the stories work but obviously my app fails. I am seeing this error when I run storybook

TypeError: this.input.charCodeAt is not a function at PlainCharacterCursor.charAt (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:38464:27) at PlainCharacterCursor.updatePeek (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:38483:61) at PlainCharacterCursor.init (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:38442:14) at new _Tokenizer (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:37826:26) at tokenize (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:37774:23) at HtmlParser.parse (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:38658:32) at HtmlParser.parse (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:38974:22) at parseTemplate (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:46965:36) at parseJitTemplate (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:48041:20) at CompilerFacadeImpl.compileComponent (http://localhost:6006/vendors-node_modules_bootstrap_dist_css_bootstrap_min_css-node_modules_ngx-bootstrap_datepick-82fe14.iframe.bundle.js:47866:45)

Wondering what is causing this issue considering it was all good with earlier versions. I have tried removing addons but still doesn't fix the issue.

Additional context Add any other context about the problem here. Screen Shot 2021-09-13 at 1 42 51 pm

shilman commented 2 years ago

@pramodx what version were you updating from?

pramodx commented 2 years ago

@pramodx what version were you updating from?

@shilman - 5.3.18