question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide console output on missing addons

See original GitHub issue

Is your feature request related to a problem? Please describe.

I just spent a few minutes trying to debug my storybook integration until I noticed that I had (through careless copy&paste) registered the @storybook/addon-viewport in my addons.js file – but I had not npm-installed it.

I know this was stupid by me for not setting things up in a thorough way 🤦‍♂️

Still, running npm run storybook produced a webpack built without throwing any errors or giving hints:

info @storybook/vue v4.1.11
info
info => Loading presets
info => Loading presets
info => Loading custom .babelrc
info => Loading custom .babelrc
info => Loading custom addons config.
info => Loading custom webpack config (full-control mode).
webpack built 6ee5b84edc8caae1b3bb in 3449ms

Of course, opening Storybook on the assigned localhost resulted in a Cannot get / message.

Describe the solution you’d like

I would have liked the setup to at least give me a warning that the addon I registered wasn’t available instead of just swallowing that error (which must have happened somewhere!?).

Describe alternatives you’ve considered

I can’t really think of an alternative. I do think swallowing any errors is not a good thing to do, though 😄

Are you able to assist bring the feature to reality?

Maybe, I don’t know? I’m not familiar with the code base & webpack. Would still give it a shot.

Additional context

As you might see, I have a custom webpack and babelrc (nothing special, “just” alias resolving & some sass files being loaded), but I don’t think that relates (or should relate) to the issue described here.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
martshingcommented, Feb 4, 2019

I’m not sure of the correct way to fix this but after some digging around I managed to find a way to output the suppressed webpack errors for addons.

File - ./node_modules/@storybook/core/server/dev-server.js line 125 - This promise.all is swallowing all errors from the two queued promises, the way I got it to bubble out was to change it to:

Promise.all([
    managerPromise.catch(e => e),
    previewPromise.catch(e => e)
  ]).then(([managerStats, previewStats]) => {

This should allow storybook to serve correctly and the webpack error can be seen in the browser console

2reactions
mrmckebcommented, Feb 16, 2019

CONGRATULATIONS 😉 And don’t worry, we’ll see if someone else can pick this up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to open the correct devtools console to see output from ...
Output will be shown in the regular web console (in the web Developer Tools). You can open it by pressing F12 (or other...
Read more >
Change in attached console output behavior? (no ... - GitHub
Steps to reproduce the issue: use the compose provided lower down in this issue; try docker compose up vs docker-compose up; see difference....
Read more >
Splunk App for Jenkins missing certain console lin...
We're using the Splunk App for Jenkins and Splunk Plugin for Jenkins in order to ingest Jenkins logs into Splunk. By default, this...
Read more >
Console app not showing info and debug logs
I've tried running the Console app as root, via sudo from the command line and the same issue occurs; no debug or info...
Read more >
Show console output while debugging – Rider Support
When I debug my applications in Visual studio I can see all my log entries that are written to the console in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found