Open lastmjs opened 8 months ago
This seems to be happening with various files, I'll put them in here as comments:
TypeScript error: The symbol "debuglog" has already been declared
https://github.com/second-state/wasmedge-quickjs/blob/main/modules/util.js#L2
TypeScript error: The symbol "promisify" has already been declared
https://github.com/second-state/wasmedge-quickjs/blob/main/modules/util.js#L1
TypeScript error: The symbol "deprecate" has already been declared
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.
Stats
is both imported and there is a local class called Stats
as well. This is not allowed.
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.