stackblitz / webcontainer-core Goto Github PK
View Code? Open in Web Editor NEWDev environments. In your web app.
Home Page: https://webcontainers.io
License: MIT License
Dev environments. In your web app.
Home Page: https://webcontainers.io
License: MIT License
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
Describe the bug
esmodule syntax doesn't work when setting type: "module" on package.json nor when renaming index.js to index.mjs
Link to the blitz that caused the error
https://stackblitz.com/edit/node-e2tzh5?file=index.mjs
To Reproduce
Steps to reproduce the behavior:
node index.mjs
from the terminalExpected behavior
Running the mjs file
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 65041199,
usedJSHeapSize: 59647271,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
Describe the bug
A WebContainer gets stuck on the Booting WebContainer
step and devtools shows the error Cannot set property 'NodeFS.gcomp' of undefined
where NodeFS.gcomp is the name of both a folder and a file within a folder for my project:
Full error text:
[Violation] Forced reflow while executing JavaScript took 42ms client-c18b3511dd425ab7c939b.js:2 Uncaught (in promise) TypeError: Cannot set property 'NodeFS.gcomp' of undefined at client-c18b3511dd425ab7c939b.js:2 at Array.reduce () at client-c18b3511dd425ab7c939b.js:2 at Array.forEach () at C (client-c18b3511dd425ab7c939b.js:2) at client-c18b3511dd425ab7c939b.js:2 at u (client-c18b3511dd425ab7c939b.js:2) at Generator._invoke (client-c18b3511dd425ab7c939b.js:2) at Generator.E.forEach.e. [as next] (client-c18b3511dd425ab7c939b.js:2) at client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 C @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 u @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 E.forEach.e. @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 nrWrapper @ node-webvi-express?file=Builds:8 r @ node-webvi-express?file=Builds:8 _ @ client-c18b3511dd425ab7c939b.js:2 x @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 Da @ client-c18b3511dd425ab7c939b.js:2 As @ client-c18b3511dd425ab7c939b.js:2 t.unstable_runWithPriority @ client-c18b3511dd425ab7c939b.js:2 vo @ client-c18b3511dd425ab7c939b.js:2 Ds @ client-c18b3511dd425ab7c939b.js:2 _s @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 t.unstable_runWithPriority @ client-c18b3511dd425ab7c939b.js:2 vo @ client-c18b3511dd425ab7c939b.js:2 Eo @ client-c18b3511dd425ab7c939b.js:2 wo @ client-c18b3511dd425ab7c939b.js:2 Es @ client-c18b3511dd425ab7c939b.js:2 notify @ client-c18b3511dd425ab7c939b.js:2 t.notifyNestedSubs @ client-c18b3511dd425ab7c939b.js:2 t.handleChangeWrapper @ client-c18b3511dd425ab7c939b.js:2 y @ client-c18b3511dd425ab7c939b.js:2 dispatch @ VM655:3856 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 dispatch @ VM655:14608 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 nrWrapper @ node-webvi-express?file=Builds:8 Promise.then (async) (anonymous) @ node-webvi-express?file=Builds:8 i @ client-c18b3511dd425ab7c939b.js:2 Jo @ client-c18b3511dd425ab7c939b.js:2 da @ client-c18b3511dd425ab7c939b.js:2 Ns @ client-c18b3511dd425ab7c939b.js:2 js @ client-c18b3511dd425ab7c939b.js:2 Os @ client-c18b3511dd425ab7c939b.js:2 ys @ client-c18b3511dd425ab7c939b.js:2 Zs @ client-c18b3511dd425ab7c939b.js:2 Js @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 xs @ client-c18b3511dd425ab7c939b.js:2 ac @ client-c18b3511dd425ab7c939b.js:2 render @ client-c18b3511dd425ab7c939b.js:2 m @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 f @ client-c18b3511dd425ab7c939b.js:2 g @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 nrWrapper @ node-webvi-express?file=Builds:8 Show 8 more frames registry.worker.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6 [@blitz/registry] [INFO] Successfully initialized blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:8 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details. _0x4c8301 @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:8 initFileSystem @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 init @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 _0x293e01 @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details. _0x293e01 @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 node-webvi-express?file=Builds:8 [Violation] 'setTimeout' handler took 149ms [Violation] Forced reflow while executing JavaScript took 31ms blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details. _0x293e01 @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 client-c18b3511dd425ab7c939b.js:2 Uncaught (in promise) TypeError: Cannot read property 'updateOptions' of undefined at client-c18b3511dd425ab7c939b.js:2 at u (client-c18b3511dd425ab7c939b.js:2) at Generator._invoke (client-c18b3511dd425ab7c939b.js:2) at Generator.E.forEach.e. [as next] (client-c18b3511dd425ab7c939b.js:2) at a (client-c18b3511dd425ab7c939b.js:2) at nrWrapper (node-webvi-express?file=Builds:8) (anonymous) @ client-c18b3511dd425ab7c939b.js:2 u @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 E.forEach.e. @ client-c18b3511dd425ab7c939b.js:2 a @ client-c18b3511dd425ab7c939b.js:2 nrWrapper @ node-webvi-express?file=Builds:8 Promise.then (async) (anonymous) @ node-webvi-express?file=Builds:8 c @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 nrWrapper @ node-webvi-express?file=Builds:8 r @ node-webvi-express?file=Builds:8 _t @ client-c18b3511dd425ab7c939b.js:2 value @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 nrWrapper @ node-webvi-express?file=Builds:8 setTimeout (async) nrWrapper @ node-webvi-express?file=Builds:8 value @ client-c18b3511dd425ab7c939b.js:2 As @ client-c18b3511dd425ab7c939b.js:2 t.unstable_runWithPriority @ client-c18b3511dd425ab7c939b.js:2 vo @ client-c18b3511dd425ab7c939b.js:2 Ds @ client-c18b3511dd425ab7c939b.js:2 _s @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 t.unstable_runWithPriority @ client-c18b3511dd425ab7c939b.js:2 vo @ client-c18b3511dd425ab7c939b.js:2 Eo @ client-c18b3511dd425ab7c939b.js:2 wo @ client-c18b3511dd425ab7c939b.js:2 Es @ client-c18b3511dd425ab7c939b.js:2 notify @ client-c18b3511dd425ab7c939b.js:2 t.notifyNestedSubs @ client-c18b3511dd425ab7c939b.js:2 t.handleChangeWrapper @ client-c18b3511dd425ab7c939b.js:2 y @ client-c18b3511dd425ab7c939b.js:2 dispatch @ VM655:3856 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 dispatch @ VM655:14608 z @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 u @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 E.forEach.e. @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 nrWrapper @ node-webvi-express?file=Builds:8 r @ node-webvi-express?file=Builds:8 fa @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ client-c18b3511dd425ab7c939b.js:2 r._invokeFactory @ loader.js:7 r.complete @ loader.js:7 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._resolve @ loader.js:8 r.defineModule @ loader.js:7 o @ loader.js:7 r @ editor.main.js:6 r._invokeFactory @ loader.js:7 r.complete @ loader.js:7 r._onModuleComplete @ loader.js:8 r._onModuleComplete @ loader.js:8 r._resolve @ loader.js:8 r.defineModule @ loader.js:7 _ @ loader.js:8 window.define @ client-c18b3511dd425ab7c939b.js:2 (anonymous) @ editor.main.nls.js:6 Show 44 more frames iframe.7286dbe8d47d3…048fb59b05f2.html:1 Uncaught (in promise) {message: "ENOENT: no such file or directory", code: "ENOENT", errno: -2, path: undefined, syscall: undefined, …} Promise.then (async) apply @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 run @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 async function (async) run @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 registerListenersAndRunOnInstance @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 run @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 _0x293e01 @ blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11 [Deprecation] SharedArrayBuffer will require cross-origin isolation as of M91, around May 2021. See https://developer.chrome.com/blog/enabling-shared-array-buffer/ for more details.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-webvi-express
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Blitz continues to load and I eventually can run the npm start
command
Screenshots
See above.
Desktop (please complete the following information):
Additional context
My guess is that something is getting tripped up by the file output of our tool which places files inside folders of the same name, ie a folder named NodeFS.gcomp (yes the folder name has a period) containing a file named NodeFS.gcomp.
If I manually remove folders with that naming convention the WebContainer is able to fully load: https://stackblitz.com/edit/node-webvi-express-names-clean
name: Bug report
about: npx create-xxx created files are always not saved into the project
title: ''
labels: ''
assignees: ''
Describe the bug
npx create-xxx created files are always not saved into the project
Link to the blitz that caused the error
All current node projects wont work
like https://stackblitz.com/edit/ef-playground
To Reproduce
Steps to reproduce the behavior:
remove all files in the project
cd /projects
npx create-ef-app ef-playground
(all the way enter)
Expected behavior
All created files should appear in the file lists and will be saved.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 102110997,
usedJSHeapSize: 76362701,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
Describe the bug
new Error().stack[0].getFileName()
does not return the file name but undefined
. It should return the location of the file in the stack trace.
This is a common strategy to detect a caller file location. It is used in get-caller-file package, which has 25 million downloads per week accordingly to NPM. As it only requires a few lines of code it is very likely that the same technique is used even more.
It requires overloading of Error.prepareStackTrace
. The implementation in get-caller-file
package could be found here: https://github.com/stefanpenner/get-caller-file/blob/master/index.ts
I noticed this when trying to run ember-cli
, which relies on get-caller-file
.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-ynwi5b?file=index.js
The following code returns undefined
in Stackblitz but a file path in regular node installation.
Error.prepareStackTrace = (_, stack) => stack;
const error = Error('myError');
console.log(error.stack[0].getFileName());
You can execute by running node index.js
in the blitz linked above.
As an alternative reproduction you could install get-caller-file
and follow the usage example given in its documentation. It will demonstrate the same difference between regular node installation and stackblitz.
Expected behavior
It should return a file path in Stackblitz as well.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 70345978,
usedJSHeapSize: 67259162,
jsHeapSizeLimit: 4294705152
}
Additional context
node-bindings
package was facing the same issue: TooTallNate/node-bindings#29 It was fixed by this commit: TooTallNate/node-bindings@d0bd6f8
name: Bug report
about: Create a report to help us improve
title: 'Always wants to install 'next' even on bare Node project'
labels: ''
assignees: ''
Describe the bug
I tried it in Brave - configured Shields to make it work in the browser. Then I installed it as desktop app. It now tries to always install 'next' (and fails) - even for plain Node.js projects
Link to the blitz that caused the error
https://stackblitz.com/edit/node-gantcb
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.93
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
performance.memory = {
totalJSHeapSize: 85706543,
usedJSHeapSize: 79518563,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
Congrats on the launch! Very exciting.
Describe the bug
npm init foo
downloads the create-foo
package and runs the "bin"
specified in its package.json. It's commonly used to scaffold new projects.
It looks like turbo init
behaves similarly to npm init
, but turbo init foo
(and by extension npm init foo
) fails:
Link to the blitz that caused the error
https://stackblitz.com/edit/node-qcu4bd
To Reproduce
Steps to reproduce the behavior:
npm init foo
or turbo init foo
Expected behavior
The same behaviour as npm init foo
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.93
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
performance.memory = {
totalJSHeapSize: 55442824,
usedJSHeapSize: 51747536,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
No
Describe the solution you'd like
A clear and concise description of what you want to happen.
Allow you to code in vscode, via the stackblitz platform. Like github codespaces. This'd be the ultimate dev experience! 🚀
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
N/A
Additional context
Add any other context or screenshots about the feature request here.
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
Describe the bug
Typescript types highlighting works on the *.ts files, but the *.tsx files it does not. I thought it might be due to use of linaria, but even non-linaria .tsx files there is no highlighting.
Link to the blitz that caused the error
https://stackblitz.com/edit/github-8auner?file=src%2FBoundary.tsx
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Hover context popup with its type
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 159765627,
usedJSHeapSize: 156720619,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
Describe the bug
Node REPL failed when running crypto.createHmac
Link to the blitz that caused the error
https://stackblitz.com/edit/http-server-fnwea1?file=server.js
To Reproduce
Steps to reproduce the behavior:
Open node REPL, enter require('crypto').createHmac('sha256', 'abcdefg').update('I love cupcakes').digest('hex');
and I got TypeError.
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
at new e.exports (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1179499)
at new Hmac (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:924216)
at Object.createHmac (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:612717)
at eval (REPL1:1:19)
at __global_eval__ (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:8:15949)
at _0x18a892 (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:21075)
at Script.runInThisContext (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:20268)
at Script.runInThisContext (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:458038)
at REPLServer.p (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1092122)
at bound (https://http-server-fnwea1.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1322974)
Expected behavior
Correct hash should be printed.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 Edg/90.0.818.62
performance.memory = {
totalJSHeapSize: 82262584,
usedJSHeapSize: 73815152,
jsHeapSizeLimit: 4294705152
}
Describe the bug
for
doesn't quite work in jsh
Link to the blitz that caused the error
To Reproduce
Steps to reproduce the behavior:
for i in *; do echo $i; done
gives an error of e.Assigns is not iterable
Expected behavior
Print every file in the folder
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
If a github repository doesn't have a master branch you're presented with several errors and can't switch to a different branch.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect to be able to switch branches
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 70065194,
usedJSHeapSize: 63652034,
jsHeapSizeLimit: 4294705152
}
Additional context
Errors in console are:
GitInit Could not resolve reference "refs/heads/master".
Uncaught (in promise) TypeError: Cannot convert undefined or null to object
Describe the bug
Running npm scripts that use paths with certain characters seems to fail.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-npm-run-script
To Reproduce
Steps to reproduce the behavior:
npm start
npm start
manually in the console by copy and pastingExpected behavior
Using npm start
is able to run the script correctly.
Desktop (please complete the following information):
Additional context
N/A
As the WebContainer installs fresh node_modules in each usage, it would be great to support different npm registry for fast installation in everywhere 😄
Describe the bug
Attempting to use zlib's brotli or gzip compression seems to generate an error like:
Cannot read property
constants of undefined.
Looking into the stack, this seems to happen because initialization of the zlib module fails due to crypto.randomBytes()
being unavailable. Looking into why that would be the case, it seems like the detection for the Web Crypto API is attempting to access self.crypto
:
<snip> "object"==typeof self)self.crypto&&self.crypto.getRandomValues ? <snip>
... unfortunately, self
has been set to undefined
(not sure why). Paused at that callsite however, global.crypto
does exist.
https://stackblitz.com/edit/node-zewtyo?file=package.json
To Reproduce
Steps to reproduce the behavior:
Go to https://stackblitz.com/edit/node-zewtyo?file=package.json
Run npm start
(or directly, node ./node_modules/.bin/wmr
)
See error:
Expected behavior
global.crypto
is used, there is no error, and importing zlib returns zlib.
Desktop (please complete the following information):
name: Bug report
about: Create a report to help us improve
title: importing github repos without master branch fails to load project files
labels: ''
assignees: ''
To Reproduce
Steps to reproduce the behavior:
Expected behavior
project files load as expected
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 54076718,
usedJSHeapSize: 51103002,
jsHeapSizeLimit: 4294705152
}
Describe the bug
*
not working in jsh
Link to the blitz that caused the error
To Reproduce
Steps to reproduce the behavior:
rm -r *
# rm: cannot remove '*': No such file or directory
mv aaa/* bbb
# mv: cannot stat 'aaa/*': No such file or directory
Expected behavior
Do what it should do
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
---name: Bug report
about: Create a report to help us improve
title: 'Received UnknownError The user denied permission to access the database.' when opening project in incognito tab via Google Chrome.
labels: ''
assignees: ''
Describe the bug
I received an error when attempting to open a nodejs StackBlitz project in an incognito tab via Google Chrome. When I open the url via incognito, I see the StackBlitz message, 'Unable to connect to local.webcontainer.io', which I'd expect. However, when selecting the open button or project title link, a new window opens with an error, 'UnknownError The user denied permission to access the database'
.
Link to the blitz that caused the error
https://express-in-browser--5000.local.webcontainer.io/
To Reproduce
Steps to reproduce the behavior:
Expected behavior
User project should open with no non-logged in state.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
**Desktop (please complete the following information):**![image](https://user-images.githubusercontent.com/37988868/119187816-d5f54f00-ba47-11eb-9daf-e4d0c30c21a8.png)Browser name = Chrome Full version = 90.0.4430.212 Major version = 90 navigator.appName = Netscape navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36 performance.memory = { totalJSHeapSize: 53737633, usedJSHeapSize: 51401537, jsHeapSizeLimit: 4294705152 }Additional context
Add any other context about the problem here.
Describe the bug
For a user running Brave under normal settings, the service worker registration for stackblitz.io fails, as it is a third party domain. This failure prevents the localhost server from being stood up for the user's blitz. To remedy the issue, a user can modify their shields (via the lion icon to the right of the address bar) in Brave to permit third-party cookies (this setting also controls third-party service workers).
Link to the blitz that caused the error
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The "localhost" connection is established, and the content is shown.
Screenshots
Desktop (please complete the following information):
Additional context
If you catch the registration failure, you can inform the user that their security settings may have prevented the feature from working. For Brave users (there are over 30 million monthly active users at the time of this writing), you can can inform them that relaxing the shield settings for cookies (and other third-party storage) will resolve the issue. This is what I did in the GIF above. Brave can be detected via its navigator.brave.isBrave
function (which returns a promise).
Describe the bug
Node's built-in way of creating a UDP server fails. While importing dgram
is allowed, calling dgram.createSocket('udp4');
throws a TypeError
. The stack trace is provided below.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-unqbfc?file=index.js
To Reproduce
Steps to reproduce the behavior:
node index.js
in the terminalExpected behavior
The UDP server is created, allowing me to send data over the socket.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional Context
Exception stacktrace
TypeError: s.getAsyncId is not a function
at new Socket (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1309655)
at Object.createSocket (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1320280)
at Object.eval (/projects/node-unqbfc/index.js:5:25)
at Object.function (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19819)
at Module._compile (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187549)
at Object.Module._extensions..js (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187908)
at Module.load (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:185988)
at Function.Module._load (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:183564)
at Function.executeUserEntryPoint [as runMain] (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:794701)
at Object.a0_0x310c (https://node-unqbfc.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1395336)
while importing error box says :
Error: Could not resolve reference "refs/heads/master".
clicking to top of files tab redirects to [repo link]/tree/null
Link to the blitz that caused the error
https://stackblitz.com/edit/nextjs-afxmy2
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Just to import github repo
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 63660623,
usedJSHeapSize: 56307547,
jsHeapSizeLimit: 2172649472
}
Additional context
Add any other context about the problem here.
Describe the bug
Node REPL crashes on require("v8").getHeapSpaceStatistics()
.
To Reproduce
Open node REPL, enter require("v8").getHeapSpaceStatistics()
. See crash:
Uncaught TypeError: j is not a function
at Object.getHeapSpaceStatistics (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:625925)
at eval (REPL10:1:15)
at __global_eval__ (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:8:15949)
at _0x18a892 (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:21075)
at Script.runInThisContext (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:20268)
at Script.runInThisContext (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:458038)
at REPLServer.p (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1092122)
at bound (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1322974)
at REPLServer.runBound [as eval] (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1324533)
at REPLServer.<anonymous> (https://node-6taf5d.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1098633)
Expected behavior
I get heap statistics.
Desktop:
Google Chrome | 90.0.4430.212 (Official Build) (64-bit) |
---|---|
Revision | e3cd97fc771b893b7fd1879196d1215b622c2bed-refs/branch-heads/4430@{#1429} |
OS | Linux |
JavaScript | V8 9.0.257.29 |
name: Bug report
about: Create a report to help us improve the Nextjs environment
title: ''
labels: ''
assignees: ''
Describe the bug
I copied a bunch of folders into the /pages directory and I could not open these newly added pages.
When I created the same folders manually, they worked well.
Link to the blitz that caused the error
https://stackblitz.com/edit/nextjs-mh5kn3?file=pages%2Finvestments%2Findex.js
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Once I drop any file / folder into the pages directory, they should automatically be saved and cause a hot reload of the live server.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.93
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
performance.memory = {
totalJSHeapSize: 85509863,
usedJSHeapSize: 80044759,
jsHeapSizeLimit: 4294705152
}
Additional context
Nothing else I guess
name: Bug report
about: https://stackblitz.com/edit/node-zfkjjc?file=index.js
title: 'BUG: node-fetch/https.get doesn't work (Socket hang up)'
labels: 'http, socket, networking'
assignees: ''
Describe the bug
Unable to load remote data via node-fetch (or https module).
Link to the blitz that caused the error
https://stackblitz.com/edit/node-zfkjjc?file=index.js
Expected behavior
A clear and concise description of what you expected to happen.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Brave
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 56890553,
usedJSHeapSize: 50431077,
jsHeapSizeLimit: 4294705152
}
Starting the develop server fails as a lockfile can't be loaded. I'm guessing it fails because of this like https://github.com/gatsbyjs/gatsby/blob/80a9079bd16de7dbd4d48be714885de412b46e57/packages/gatsby-core-utils/src/service-lock.ts#L16 ?
So either xdg-basedir
isn't working right or tmp
.
There may be other things but that's as far as I got.
name: Bug report
about: Create a report to help us improve
title: 'GraphQL starter returns error EOF'
labels: 'graphql'
assignees: ''
Describe the bug
The GraphQL starter seems to have a minor misconfiguration issue.
Link to the blitz that caused the error
https://stackblitz.com/edit/graphql-s4wnmh
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should see "Hello World!"
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Chrome
Full version = 87.0.4280.141
Major version = 87
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36
performance.memory = {
totalJSHeapSize: 63021506,
usedJSHeapSize: 59189210,
jsHeapSizeLimit: 2172649472
}
Additional context
Add any other context about the problem here.
name: Bug report
about: Create a report to help us improve
title: 'TypeError: Class extends value undefined is not a constructor or null'
labels: ''
assignees: ''
Describe the bug
npx next dev
triggers error after installing aws-amplify
and @aws-amplify/ui-react
:
TypeError: Class extends value undefined is not a constructor or null
at Object.618 (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:161)
at __nccwpck_require__ (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11796)
at Object.270 (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:474)
at __nccwpck_require__ (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11796)
at Object.327 (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:321)
at __nccwpck_require__ (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11796)
at Object.845 (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:3794)
at __nccwpck_require__ (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11796)
at eval (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11924)
at Object.eval (/projects/nextjs-fbxtsa/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11950)
at Object.function (https://nextjs-fbxtsa.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19819)
at Module._compile (https://nextjs-fbxtsa.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187549)
at Object.Module._extensions..js (https://nextjs-fbxtsa.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187908)
at Module.load (https://nextjs-fbxtsa.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:185988)
at Function.Module._load (https://nextjs-fbxtsa.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:183564)
at Module.require (https://nextjs-fbxtsa.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:186304)
error Command failed with exit code 1
Link to the blitz that caused the error
https://stackblitz.com/edit/nextjs-fbxtsa?file=pages%2Findex.js
To Reproduce
Steps to reproduce the behavior:
npm i aws-amplify @aws-amplify/ui-react
npm install && npx next dev
Expected behavior
I didn't change any of the code, only installed dependencies, so I expected npx next dev
to work at least.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.93
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
performance.memory = {
totalJSHeapSize: 97503413,
usedJSHeapSize: 74534329,
jsHeapSizeLimit: 4294705152
}
Describe the solution you'd like
https://stackblitz.com/edit/sveltekit-template
This is a clone of the current SvelteKit template app
Turbo failed to install @sveltejs/kit@next
however using npm
"worked" 🤷
The webcontainer fails to start, I believe it is something to do with the package resolution. SvelteKit is built with pnpm
if that matters.
Before I new to use Turbo I had installed the deps with npm
and was unable to run npm run dev
as there was an issue resolving the deps. I will try and recreate and pase the error here.
Give a link to a github repo containing an example of the framework
I am the creator of adapter to configure SvelteKit apps for SSR hosting on Firebase - svelte-adapter-firebase
Here is the same template as above that I use for CI testing of the adapter - https://github.com/jthegedus/svelte-adapter-firebase/tree/main/examples/functions_single_site
I am keen to have a complete solution for Firebase web app development.
Additional context
#8 is almost certainly related because:
v2 of StackBlitz looks amazing!
The only thing, I can't get Gatsby to work.
Describe the bug
Error: listen EADDRINUSE: address already in use ::
...
UNHANDLED REJECTION Cannot read property 'updateTimeout' of undefined
Link to the blitz that caused the error
gatsby-starter
To Reproduce
Steps to reproduce the behavior:
Expected behavior
See the index page of the app -or- get it up and running, basically.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 71299714,
usedJSHeapSize: 66683866,
jsHeapSizeLimit: 4294705152
}
Additional context
I really hope we can sort this out and even better, get a default Gatsby starter provided by your amazing Team! (You can use mine if you wish)
Happy day!
Tobias Høegh
name: Bug report
about: Create a report to help us improve
Describe the bug
When I open a local folder from my Mac, it doesn't include the .svg files.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-uwf9jt?file=components%2Fsocial-icons%2Findex.js
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 142216057,
usedJSHeapSize: 121063469,
jsHeapSizeLimit: 2172649472
}
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
Describe the bug
It seems it cannot open a port (so the final step hangs)
Link to the blitz that caused the error
https://stackblitz.com/edit/nextjs-rbr6hp
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.93
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
performance.memory = {
totalJSHeapSize: 63342813,
usedJSHeapSize: 55091709,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
Describe the bug
A broken link in the interweb between the latest blog post and this repository.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected to be transported from the blog page to the repo page
Additional context
the exact broken link is https://github.com/stackblitz/webcontainer-core/blob/main/Add_support_for_a_framework.md
name: Bug report
about: Create a report to help us improve
title: 'project with "type": "module"
not working'
labels: 'esm'
assignees: ''
Describe the bug
If you add the entry "type": "module"
on package.json
break the normal behavior
Link to the blitz that caused the error
https://stackblitz.com/edit/node-wyhu7f?file=package.json
To Reproduce
Steps to reproduce the behavior:
index.js
Expected behavior
A message is this display with : Hello Node.js v14.16.0!
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 63981338,
usedJSHeapSize: 59038818,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
When you are on the command line and want to go folder(s) above and type " cd .." and want to autocomplete with tab, it doesn't give you the "/"
Describe the bug
I have attempted to execute the Node starter demo in Chrome using modules and it does not work.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-v6m1qa
To Reproduce
Steps to reproduce the behavior:
I tried two different approaches:
"types": "module"
to the package.json file.index.js
to index.mjs
In both approaches I attempted to execute these code samples:
import fs from "fs";
fs.readdir("./", function (err, list) {
console.log(err);
console.log("");
console.log(list.join(", "));
});
import ("fs").then(
fs.readdir("./", function (err, list) {
console.log(err);
console.log("");
console.log(list.join(", "));
})
);
Expected behavior
Expected output:
null
index.js, package-lock.json, package.json
The expected output occurs if I use old common JS approach: let fs = require("fs");
. In the case of modules nothing outputs to the terminal, not even error messaging.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
The expected Node error messaging does display if not appeasing Node's requirements for supporting modules, which are either rename the file from extension .js
to .mjs
or adding the "types": "module"
to the package.json file.
Is your feature request related to a problem? Please describe.
It would be great if the preview iframe included support for the payment request handler so that projects that make use of it can function correctly.
For instance, clicking the Google Pay button in the example while in the preview launches a new tab/window which is a workaround for when the payment request isn't supported. Ideally, the behavior should match the experience if you open the content in its own window (e.g. by clicking the Open in new window link) which shows a modal dialog (on Chrome)
Describe the solution you'd like
My proposed solution is to include payment
to the iframe's allow
attribute. This will allow the payment handler to be triggered by the content of the iframe.
Describe alternatives you've considered
My current workaround is to do some detection in the code and include instructions for the user to open the window in a new tab.
Example: https://stackblitz.com/edit/nextjs-nakdbt?file=pages%2Findex.js
Additional context
Clicking on the Google Pay button in the preview tab launches the payment sheet in a new window (not desirable behavior).
Clicking on the Google Pay button in its own window launches the payment sheet in a modal window (expected behavior on Chrome)
Previous feature request: https://twitter.com/aussoc/status/1359219567600390145
Describe the bug
When forking a project, the URL in the preview panel isn't updated to reflect the URL of the new fork. Therefore, modifications to the project are not reflected in the preview panel.
The workaround is to refresh the entire screen.
Link to the blitz that caused the error
https://stackblitz.com/edit/nextjs-bw83rd?file=pages%2Findex.js
To Reproduce
Steps to reproduce the behavior:
index.js
index.js
aren't reflected in the previewExpected behavior
The preview panel URL should be updated to reflect the new forked project and any subsequent changes to index.js
should be applied to the preview.
Screenshots
N/A
Desktop (please complete the following information):
Additional context
N/A
Describe the bug
Using a library that loads and runs WASM does not seem to run (a terminating log statement is not hit or error logged) unless the dev tools are open and you explicitly step through execution to the end.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-vireo-hello-world
To Reproduce
Steps to reproduce the behavior:
Open the blitz and run node index.js
with devtools closed
Note that the output shows Hello Node.js v14.16.0!
but does not show an ascii art mandelbrot or the output done :D
Open the blitz and run node index.js
with devtools open. Meticulously step through the code stepping into functions and stepping into async tasks (not running to a breakpoint).
Note that everything seems to work correctly and print the above mentioned output 🤯
Expected behavior
Expect the mandelbrot ascii art and completion message to print without meticulously stepping through the code in the chrome debugger.
Screenshots
See above
Desktop (please complete the following information):
Additional context
If I had to guess maybe there is an issue with async and waiting for tasks in the event queue to complete? How the heck would that even work without plugs into V8 itself or something funny like shimming zone.js into everything? (goes to mess with the example) I actually think this might be the issue, if I add a setInterval to keep the event queue alive it seems to print everything reliably: https://stackblitz.com/edit/node-vireo-hello-world-event-queue-keepalive
Edit: This is really freakin cool ♥
Hello, the "Limitations" > "Native binaries and NPM postinstall scripts" section of this repo's README contains the statement that there are "no plans on remediating the behavior".
https://github.com/stackblitz/webcontainer-core/blob/main/README.md#limitations
If you weren't already aware, yarn has a public RFC relating to this - see yarnpkg/berry#2751
In response, the npm team are now also planning an RFC - see yarnpkg/berry#2751 (comment)
Although these proposals won't solve the problem on their own, they are a very welcome step towards doing so, and may qualify as "plans on remediating the behavior". 🤞
Is your feature request related to a problem? Please describe.
I'm frustrated when I open a WebContainer and I have to manually start it to see the behavior.
Describe the solution you'd like
As a WebContainer author I'd like the container to start running automatically by including a script named "start"
in my package.json.
Describe alternatives you've considered
Can't think of any workaround to have a script auto start.
Additional context
N/a
Describe the bug
Running npm dev
(start command) on next.js project does't work on brave browser by default. Booting the web container, Installing dependencies works successfully but running start command doesn't work.
If you open the console you may get following error :
Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
x.clearbitjs.com/v1/pk_cf7f6c8b720be71dfc730b02eb55b0bd/clearbit.min.js:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
js-agent.newrelic.com/nr-spa-1208.min.js:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
registry.worker.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6
Link to the blitz that caused the error
https://stackblitz.com/edit/nextjs-nee224
To Reproduce
Steps to reproduce the behavior:
Expected behavior
using npm dev
should allow to
Desktop (please complete the following information):
Fix
This error might occur beacuse brave browser might block the cookies for stackblitz. For fix I've followed the given steps:
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
Describe the bug
A clear and concise description of what the bug is.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-bxeuqr
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 65061278,
usedJSHeapSize: 58711870,
jsHeapSizeLimit: 2172649472
}
Additional context
Add any other context about the problem here.
Describe the bug
@trezy tried WebContainer live on Twitch and ran into the issue where next dev
fails to build after installing sass
. After a page refresh it works.
Link to the blitz that caused the error
To Reproduce
Steps to reproduce the behavior:
turbo add sass
turbo dev
/projects/nextjs-cp1rsm
❯ turbo dev
$ next dev
TypeError: Class extends value undefined is not a constructor or null
at Object.618 (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:161)
at __nccwpck_require__ (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11796)
at Object.270 (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:474)
at __nccwpck_require__ (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11796)
at Object.327 (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:321)
at __nccwpck_require__ (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11796)
at Object.845 (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:3794)
at __nccwpck_require__ (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11796)
at eval (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11924)
at Object.eval (/projects/nextjs-cp1rsm/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:11950)
turbo dev
works 🎉Expected behavior
After running turbo add sass
, the turbo dev
command should just work.
Screenshots
/
Desktop (please complete the following information):
Additional context
/
name: Bug report
about: Create a report to help us improve
title: 'can't run fastify webserver [Error: EBADF: bad file descriptor, write] '
labels: ''
assignees: ''
Describe the bug
can't run the fastify webserver
[nodemon] restarting due to changes...
[nodemon] starting `node server.js`
[Error: EBADF: bad file descriptor, write] {
syscall: 'write',
errno: -9,
code: 'EBADF'
}
[nodemon] app crashed - waiting for file changes before starting...
Link to the blitz that caused the error
https://stackblitz.com/edit/http-server-r8kujv
To Reproduce
Steps to reproduce the behavior:
Expected behavior
nodemon will start the script, fastify webserver should start at port 3000
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.218
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (X11; CrOS x86_64 13816.82.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.218 Safari/537.36
performance.memory = {
totalJSHeapSize: 53915145,
usedJSHeapSize: 52589837,
jsHeapSizeLimit: 2020868096
}
Additional context
I know fastify is rather low level node.js, but if this works almost anything will work ;-)
Describe the bug
The invite link of Discord in the README.md is invalid. (There are two same links.)
Link to the blitz that caused the error
To Reproduce
Expected behavior
Desktop (please complete the following information):
Smartphone (please complete the following information):
N/A
Additional context
N/A
Describe the solution you'd like
Swap esbuild
to esbuild-wasm
at install time.
Give a link to a github repo containing an example of the framework
Not a github repo, but Evan You has expressed interest: https://twitter.com/youyuxi/status/1395438994725478400
Additional context
@d3lm @KwintenP @SamVerschueren I think we have this in the pipeline, not sure if it's on prod yet. We should test vite
specifically to ensure it works OOTB.
name: Bug report
about: jsh syntax error when installing npm package as global
title: ''
labels: ''
assignees: ''
Describe the bug
I'm unable to install any node modules as global via npm. I keep getting syntax error
Unknown Syntax Error: Command not found; did you mean one of:
Link to the blitz that caused the error
https://stackblitz.com/edit/node-vutu3g?file=README.md
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 136726149,
usedJSHeapSize: 130206821,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
Describe the bug
Usually when executing npx <cli_name>
, npx
will look for local node_modules/.bin
before trying to install the CLI from a registry. Although, this does not work as you can see in the screenshot, nestjs/cli
is installed as a devDependencies
Link to the blitz that caused the error
https://stackblitz.com/edit/github-yid42f?file=package.json
To Reproduce
Steps to reproduce the behavior:
npx nest
Expected behavior
npx nest
should execute the already-installed nestjs/cli
Desktop (please complete the following information):
Describe the bug
When you execute a binary (e.g. via execa.sync
) the process crashes and a SyntaxError is output to stderr
.
❯ node repro.js
Error: Command failed with exit code 1: /projects/node-psqsqe/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x
SyntaxError: Invalid or unexpected token
at __global_eval__ (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:8:15954)
at _0x18a892 (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:21075)
at _0x372288.runInThisContext (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:20268)
at _0x2e8059 (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19362)
at wrapSafe (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:186554)
at Module._compile (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187186)
at Object.Module._extensions..js (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187908)
at Module.load (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:185988)
at Function.Module._load (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:183564)
at Function.executeUserEntryPoint [as runMain] (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:794701)
at makeError (/projects/node-psqsqe/node_modules/execa/lib/error.js:59:11)
at Function.module.exports.sync (/projects/node-psqsqe/node_modules/execa/index.js:186:17)
at Object.eval (/projects/node-psqsqe/repro.js:21:26)
at Object.function (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19819)
at Module._compile (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187549)
at Object.Module._extensions..js (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187908)
at Module.load (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:185988)
at Function.Module._load (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:183564)
at Function.executeUserEntryPoint [as runMain] (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:794701)
at Object.a0_0x310c (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:1395336) {
shortMessage: 'Command failed with exit code 1: /projects/node-psqsqe/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x',
command: '/projects/node-psqsqe/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: 'SyntaxError: Invalid or unexpected token\n' +
' at __global_eval__ (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:8:15954)\n' +
' at _0x18a892 (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:21075)\n' +
' at _0x372288.runInThisContext (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:20268)\n' +
' at _0x2e8059 (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19362)\n' +
' at wrapSafe (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:186554)\n' +
' at Module._compile (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187186)\n' +
' at Object.Module._extensions..js (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187908)\n' +
' at Module.load (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:185988)\n' +
' at Function.Module._load (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:183564)\n' +
' at Function.executeUserEntryPoint [as runMain] (https://node-psqsqe.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:794701)',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
}
Looks to me as the binary never really is executed but something fails earlier.
Link to the blitz that caused the error
https://stackblitz.com/edit/node-ktsmgm?file=repro.js
To Reproduce
Steps to reproduce the behavior:
node repro.js
You can observe similar behavior by running e.g. npx prisma -v
.
Expected behavior
The binary can be executed and e.g. data is returned.
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.93
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
performance.memory = {
totalJSHeapSize: 87445835,
usedJSHeapSize: 83184883,
jsHeapSizeLimit: 4294705152
}
Additional context
The blitz uses prisma
to have a binary to execute, repro.js
then is a minimal version/variant of the code the Prisma CLI itself would also run. If for some reason no dependencies are installed, npm install
is not enough, also run npx prisma
, npx prisma -v
and npx prisma format
once to trigger the on demand download of said binary.
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''
Describe the bug
A clear and concise description of what the bug is.
Link to the blitz that caused the error
https://stackblitz.com/github/mc-build/mcbuild.dev?file=package.json
To Reproduce
Steps to reproduce the behavior:
Expected behavior
react and react-dom are not found by next although they are in the package.json file under dependencies.
HttpError: Failed to fetch dependencies
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 59938551,
usedJSHeapSize: 56875467,
jsHeapSizeLimit: 4294705152
}
Additional context
/projects/nbwiorvzn.github
❯ npm install && npx next dev
warn preInstall No description field
warn preInstall No repository field
warn preInstall No license field
┌ [1/3] 🔍 Resolving dependencies
└ Completed in 21.922s
┌ [2/3] 🚚 Fetching dependencies
└ 𐄂 Failed
HttpError: Failed to fetch dependencies
error Command failed with exit code 1
success Install finished in 7.539s
The module 'react' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install react'
The module 'react-dom' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install react-dom'
Error: Cannot find module 'react'
Require stack:
- /.turbo/npx/DT8K2j/node_modules/next/dist/bin/next
at Function.Module._resolveFilename (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:185516)
at Function.Module._load (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:183130)
at Module.require (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:186304)
at i (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:484674)
at _0x1e5cfd (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19724)
at Object.eval (/.turbo/npx/DT8K2j/node_modules/next/dist/bin/next:25:13)
at Object.function (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:11:19819)
at Module._compile (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187549)
at Object.Module._extensions..js (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:187908)
at Module.load (https://nbwiorvzn--github.jw.staticblitz.com/blitz.7286dbe8d47d3473cde7be488b7d048fb59b05f2.js:6:185988) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/.turbo/npx/DT8K2j/node_modules/next/dist/bin/next' ]
}
error Command failed with exit code 1
/projects/nbwiorvzn.github 39s
❯
/projects/nbwiorvzn.github
❯
Describe the bug
imported TypeScript libs don't seem inferred
Link to the blitz that caused the error
https://stackblitz.com/github/trpc/trpc/tree/main/examples/next-prisma-starter?file=pages%2Fapi%2Ftrpc%2Fposts.ts
To Reproduce
Steps to reproduce the behavior:
postsRouter
Expected behavior
Should have typescript definition
Version of webcontainer
Hash: 7286dbe8d47d3473cde7be488b7d048fb59b05f2
Screenshots
If applicable, add screenshots to help explain your problem.
infers type any
infers correct type
https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/next-prisma-starter?file=/pages/api/trpc/posts.ts
Desktop (please complete the following information):
Browser name = Chrome
Full version = 90.0.4430.212
Major version = 90
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
performance.memory = {
totalJSHeapSize: 138985846,
usedJSHeapSize: 132344770,
jsHeapSizeLimit: 4294705152
}
Additional context
Add any other context about the problem here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.