Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook 5.1.0-beta.1 is not showing all stories and has a TypeError in the console #6813

Closed
kaiyoma opened this issue May 17, 2019 · 12 comments

Comments

@kaiyoma
Copy link

kaiyoma commented May 17, 2019

Describe the bug
After upgrading from 5.1.0-alpha.39 to 5.1.0-beta.1, most of my stories are missing from the sidebar. There's also a JavaScript error in the console:

TypeError: Cannot read property 'slice' of undefined
    at Object.<anonymous> (vendors~main.1802bec481c24205c53d.bundle.js:380134)
    at Object../node_modules/readable-stream/lib/_stream_writable.js (vendors~main.1802bec481c24205c53d.bundle.js:380765)
    at __webpack_require__ (runtime~main.1802bec481c24205c53d.bundle.js:787)
    at fn (runtime~main.1802bec481c24205c53d.bundle.js:150)
    at Object../node_modules/readable-stream/readable-browser.js (vendors~main.1802bec481c24205c53d.bundle.js:381034)
    at __webpack_require__ (runtime~main.1802bec481c24205c53d.bundle.js:787)
    at fn (runtime~main.1802bec481c24205c53d.bundle.js:150)
    at Object../node_modules/stream-browserify/index.js (vendors~main.1802bec481c24205c53d.bundle.js:395418)
    at __webpack_require__ (runtime~main.1802bec481c24205c53d.bundle.js:787)
    at fn (runtime~main.1802bec481c24205c53d.bundle.js:150)

Here's the line in question (in Chrome devtools):

var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick;

System:

  • OS: Windows 10
  • Browser: Chrome 74
  • Framework: React
  • Version: 5.1.0-beta.1
@kaiyoma
Copy link
Author

kaiyoma commented May 28, 2019

Still an issue in 5.1.0-rc.2.

@shilman
Copy link
Member

shilman commented May 28, 2019

@kaiyoma I missed this one somehow. We'll try to get it figured out before the 5.1 release. Do you have a repro available?

@kaiyoma
Copy link
Author

kaiyoma commented May 28, 2019

@shilman No, not easily. We use Storybook in our project for our internally developed components.

@kaiyoma
Copy link
Author

kaiyoma commented May 28, 2019

I glanced again at the error in the Chrome debugger and if I set a breakpoint on the line I mentioned above, I see ReferenceError: process is not defined when I hover over process. Hope this helps.

@djMax
Copy link

djMax commented Jun 1, 2019

rc3 behaving the same.

@shilman
Copy link
Member

shilman commented Jun 1, 2019

Thanks guys. Looks like it's due to this change: #6767

I'll put together a fix this weekend.

@libetl
Copy link
Member

libetl commented Jun 1, 2019

hmmm. Shall we remove the readable-stream dependency once for all ?

@shilman
Copy link
Member

shilman commented Jun 2, 2019

@libetl I don't understand the dependency and what it has to do with this bug. Can you elaborate?

@libetl
Copy link
Member

libetl commented Jun 2, 2019

I mean the readable-stream npm dependency, indirectly pulled from the crypto module (to calculate hashes) contains the line of code responsible for crashing (or degrading) the application.

If we find another solution for hashing values, we remove that dependency.

Do you have another solution ?

@shilman
Copy link
Member

shilman commented Jun 3, 2019

Attempted to fix this in #6946 which was released in https://github.com/storybookjs/storybook/releases/tag/v5.1.0-rc.4

@kaiyoma @djMax can you try it out and let me know if that worked?

@jmcpeak
Copy link

jmcpeak commented Jun 3, 2019

Attempted to fix this in #6946 which was released in https://github.com/storybookjs/storybook/releases/tag/v5.1.0-rc.4

@kaiyoma @djMax can you try it out and let me know if that worked?

I had the same issue - v5.1.0-rc.4 resolves the issue for me - thanks!

@shilman shilman closed this as completed Jun 3, 2019
@kaiyoma
Copy link
Author

kaiyoma commented Jun 3, 2019

@shilman Yup, fixed our issue too. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants