Skip to content

Commit 31d86c5

Browse files
committed
docs: include ideal reproduction steps
1 parent 8df6aa8 commit 31d86c5

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body:
77
Thank you for reporting an issue :pray:.
88
99
This issue tracker is for bugs and issues found within WebContainer.
10-
If you experience issues unrelated to WebContainer, pleas file an issue in our StackBlitz core repo. https://github.com/stackblitz/core
10+
If you experience issues unrelated to WebContainer, please file an issue in our StackBlitz core repo. https://github.com/stackblitz/core
1111
1212
The more information you fill in, the better we can help you.
1313
- type: textarea
@@ -21,6 +21,7 @@ body:
2121
id: link
2222
attributes:
2323
label: Link to the blitz that caused the error
24+
description: Please do not delete it after reporting!
2425
validations:
2526
required: true
2627
- type: textarea

repro.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Useful Bug Reports for WebContainer issues
2+
3+
In general, we always prefer a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) when looking at a bug report. Here are a few things you can do to write the perfect example when you encounter an issue with WebContainer.
4+
5+
6+
## Auto-execute Erroneous Command
7+
We always ask you to include a link to a blitz that shows the erroneous behavior. You can make things even easier to reproduce if you configure it so the command that triggers the error is run automatically on start. You can do that by including a [custom `.stackblitzrc` configuration file](https://developer.stackblitz.com/docs/platform/project-config).
8+
9+
10+
## Isolate Faulty API Calls
11+
12+
WebContainer does not cover the whole [Node.js API](https://nodejs.org/dist/v14.6.0/docs/api/), so most of the times the underlying issue is a single API call that is not behaving properly. You might find the issue when trying some script or workflow in your favorite framework, but ideally the reproduction example would be a simple Node.js script, with few or even no dependencies at all, that triggers the faulty API call immediately.
13+
14+
Remember that WebContainer allows you to debug your code! If you open the DevTools panel, all your code plus all your dependencies is there. You can also edit individual files and add `debugger` statements at will. It's almost magical!
15+
16+
## Read the Error
17+
18+
This is always good advice! But seriously, sometimes the error message will give you strong hints of what's going on. For instance, it might report that it did not find an executable file that it's usually available on local environments, or that it attempted to run a shell script with features we don't support yet.

0 commit comments

Comments
 (0)