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

Node version gives confusing error messages #505

Open
kaspar-p opened this issue Sep 24, 2024 · 1 comment
Open

Node version gives confusing error messages #505

kaspar-p opened this issue Sep 24, 2024 · 1 comment

Comments

@kaspar-p
Copy link

Using LTS node 18 means that import.meta.resolve is not defined. During the searching for preview2-shim this throws an error, but is swallowed by the message:

Unable to locate the {bold @bytecodealliance/preview2-shim} package, make sure it is installed.

when the actual error is something like

(intermediate value).resolve is not a function

Can the error also be printed, and the docs made clear about required versions of Node?

@guybedford
Copy link
Collaborator

The latest version of Node.js 18 does support this, but agreed it would be nice to improve the error message as well. Perhaps just a check of if (!import.meta.resolve) console.error('Latest Node.js 18 or newer must be used') or something like that?

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

2 participants