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

require is not defined #1880

Open
quiqueck opened this issue Oct 7, 2021 · 2 comments
Open

require is not defined #1880

quiqueck opened this issue Oct 7, 2021 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@quiqueck
Copy link

quiqueck commented Oct 7, 2021

Just updated my pyodide from 0.17.0 runnig from a WebWorker to 0.18.1. Since I updated I get the following error when calling loadPyodide from the WebWorker:

Uncaught (in promise) ReferenceError: require is not defined
    at fetchRemotePackage (pyodide.asm.js:14)
    at loadPackage (pyodide.asm.js:14)
    at pyodide.asm.js:14
    at pyodide.asm.js:14
    at loadPyodide (pyodide.js:227)
    at async listener (pyWorker.js:78)

Looks like fetchRemotePackagewas changed in 0.18 to use require('fs') when process is defined as an Object (which it is in a WebWorker).

@rth rth added the bug Something isn't working label Oct 8, 2021
@rth
Copy link
Member

rth commented Oct 8, 2021

Yes, indeed thanks for the report. I initially backported emscripten-core/emscripten#11785 to add Node support, but we also should also backport emscripten-core/emscripten#14501 to resolve this. Or better -- update emscripten version to 2.0.25+.

@rth
Copy link
Member

rth commented Oct 8, 2021

More worrisome though is that WebWorker tests didn't catch this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants