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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to compile pyodide using webpack and typescript #2842
Comments
Could you open a PR for this? Currently we seem to have 2.0.6 in the lockfile:
Could you try with Pyodide v0.21.0a2 and see if you get different errors? There has been some work by @jasongrout and other folks on the js package / webpack bundling support so there may be some improvement or different behavior now. |
Seems like the new version still doesn't work but there's a different error. |
Yep, there are three different errors coming from src/js/compat.ts related to non-static imports:
|
I've periodically looked into this but I have no idea how to fix it... |
It's been an ongoing issue for us that we don't have any developers with much JavaScript/webpack expertise. |
I expected a same error and I would help on this |
The problem is https://webpack.js.org/api/module-methods/#dynamic-expressions-in-import
|
Is this still a problem in version |
Thanks @alexmojaki. I don't think this issue was fixed. #2393 is fixed. Not sure about the others. |
A few days after the last comment above by @himself65, version 0.21.0 was released. I was able to use the new npm module in pyodide-worker-runner, which uses webpack and typescript, having previously failed with 0.20.x. And pyodide-worker-runner was then used as an npm module in futurecoder, which uses create-react-app, i.e. webpack, so it worked in two 'layers' of webpack. Same with 0.21.1. The one caveat is that initially I got an error like this:
Based on that, I added this to my module.exports = {
resolve: {
fallback: {url: false}, |
Huh I don't know which commit would have fixed this but that's good news. Maybe we can reenable the webpack test |
馃悰 Bug
When I'm trying to use pyodide in typescript project I'm getting bunch of errors during compilation:
To Reproduce
Please use following repository.
Errors related to ErrorStackParser are not showing using this project (I installed newer version) however is still should be fixed.
Expected behavior
Pyodide package is compiling.
Environment
Additional context
The text was updated successfully, but these errors were encountered: