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

fs.FileHandle is not defined or not a function #129

Open
lastmjs opened this issue Jan 25, 2024 · 0 comments
Open

fs.FileHandle is not defined or not a function #129

lastmjs opened this issue Jan 25, 2024 · 0 comments

Comments

@lastmjs
Copy link

lastmjs commented Jan 25, 2024

I'm coming across a lot of strange issues with how things are exported in these JS files. The combination of ES modules while using these ES modules in an environment that expects CommonJS and requires is causing troubles.

Here's one of them: https://github.com/second-state/wasmedge-quickjs/blob/main/modules/internal/fs/stream.js#L210

This execution path does not work in our environment. fs.FileHandle is not defined or is not a function. To resolve it I had to change the imports at the top to this: import fs, { open, write, close, statSync, FileHandle } from "../../fs";

Similar problems happen elsewhere, the ES module interoperation seems off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant