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

Improve error message for non-x86_64 platforms #71

Closed
alexcrichton opened this issue May 9, 2023 · 3 comments · Fixed by #72
Closed

Improve error message for non-x86_64 platforms #71

alexcrichton opened this issue May 9, 2023 · 3 comments · Fixed by #72

Comments

@alexcrichton
Copy link
Member

Currently if @bytecodealliance/jco and @bytecodealliance/componentize-js are installed this happens locally:

$ jco componentize -w foo.wit -o bar.wasm foo.js
(jco componentize) Error: componentize-js must first be installed separately via "npm install @bytecodealliance/componentize-js".
    at componentize (file:///home/acrichto/node-v19.8.1-linux-arm64/lib/node_modules/@bytecodealliance/jco/cli.mjs:44427:11)
    at async file:///home/acrichto/node-v19.8.1-linux-arm64/lib/node_modules/@bytecodealliance/jco/cli.mjs:45420:9

I believe the reason for this is that I'm on an AArch64 Linux machine which doesn't have precompiled binaries for Wizer, but it'd have been more helpful for me if the error had mentioned that.

@guybedford
Copy link
Collaborator

The precompliations for Wizer are listed in the optional dependencies here - https://unpkg.com/@bytecodealliance/wizer@1.6.1-beta.4/package.json.

You do just need to separately run npm install @bytecodeallianace/componentie-js in the environment I believe.

Let me know if I can assist further.

@alexcrichton
Copy link
Member Author

Oh sorry, my point is that there is no precompiled binary for my platform. The error message tells me to run npm install @bytecodealliance/componentize-js, which I already did. The error message I think can be improved here to forward wizer's own error message of "platform not supported".

@guybedford
Copy link
Collaborator

Ah, okay, noted I'll fix the error handling here.

I see you've already got onto this - as soon as the new release goes out it will be in the version range for componentize-js which should resolve the issue without any release of componentize / jco being necessary.

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

Successfully merging a pull request may close this issue.

2 participants