-
Notifications
You must be signed in to change notification settings - Fork 82
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
Compatibility issues with Node 14.4.0 and Typescript #241
Comments
Hi, I'm not so sure what E.g.: // exec.ts
import { WASI, WASIConfig } from '@wasmer/wasi';
import { WasmFs } from '@wasmer/wasmfs';
import * as transformer from '@wasmer/wasm-transformer';
...
|
Had same compilation issue. I managed it to compile with typescript with following rollup config:
with pretty much standard tsconfig. Though as rollup is trying to embed
It seems currently exported |
Managed to fix the issue, so the reason is
it works with following config:
|
We've re-implemented this package from the ground up, including the build system, so this is no longer relevant. |
Hi,
I'm interested in using the
@wasmer/wasi
library in the Typescript project, but I have challenges with it. Anyone using the@wasmer
libraries in a Typescript project?It can be that there's just something wrong with my setup (I'm not expert in this), or there are some changes needed in this library, I'm not sure, but would really appreciate the help.
Example project
package.json
tsconfig.json
src/index.ts
The problem
I get the following error:
Typescript does not show any errors.
So far, I figure out that, because in the
@wasmer/wasi
'spackage.json
there's no"type":"module"
, the CommonJS module gets loaded. That's not the problem, but the problem might be that the Typescript typing doesn't match with the CommonJS module.Workaround
Managed to get around the Typescript typing and importing the module, but it's a pretty ugly hack
Any tips how to load the module properly in the Typescript project?
The text was updated successfully, but these errors were encountered: