-
Notifications
You must be signed in to change notification settings - Fork 61
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
The symbol "Stats" has already been declared #122
Comments
This seems to be happening with various files, I'll put them in here as comments:
https://github.com/second-state/wasmedge-quickjs/blob/main/modules/util.js#L2 |
https://github.com/second-state/wasmedge-quickjs/blob/main/modules/util.js#L1 |
https://github.com/second-state/wasmedge-quickjs/blob/main/modules/util.js#L1 |
Running this project outside of WasmEdge could have a lot of WASI challenges. WASI preview 1 simply does not define a lot of host functions required in nodejs. |
These are just basic JS issues.
The build process you all have seems to ignore the issues for some reason. You'll notice in the OP that I point out the issue directly, you can't import something with the same name as a class in the same module/file. These errors are repeated a couple times. |
This is similar to what's happening various times in the wasmedge-quickjs codebase: https://www.typescriptlang.org/play?ssl=1&ssc=10&pln=1&pc=22#code/JYWwDg9gTgLgBAbzlApgQwCYDFgBsUDKAngHYDGcAvnAGZQQhwDkNAzkwNwBQXZuarVsnTY8hUhQSUgA |
I'm very sorry, I will fix them as soon as possible. |
May I ask how you got these warnings? Are you using TypeScript, or did you simply import these problematic modules? |
We are using TypeScript yes, but specifically esbuild as our bundler. Our Wasm binaries must then run in Node's Wasm environment and the Internet Computer's Wasmtime environment. Here's the most important part of our build process: https://github.com/demergent-labs/azle/blob/main/src/compiler/compile_typescript_code.ts#L56 |
Hi, I'm incorporating wasmedge-quickjs into my own project that doesn't use wasmedge as a runtime, and I'm trying to get the fs module to work.
I get this error when I try to import it with my bundling process: TypeScript error: The symbol "Stats" has already been declared
It seems pretty obvious why this is the case, see here: https://github.com/second-state/wasmedge-quickjs/blob/main/modules/internal/fs.js#L2
Stats
is both imported and there is a local class calledStats
as well. This is not allowed.The text was updated successfully, but these errors were encountered: