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

Invalid version with prerelease version of node #2760

Closed
theoparis opened this issue Dec 20, 2022 · 4 comments
Closed

Invalid version with prerelease version of node #2760

theoparis opened this issue Dec 20, 2022 · 4 comments

Comments

@theoparis
Copy link

It seems like esbuild doesn't seem to like prerelease suffixes on engine versions... It seems to be related to line 340 in pkg/api/api_impl.go - the version regex might not support -xyz suffixes...?

Also, it would be nice if I can also byasss the strict engine version checking feature similar to yarn's --ignore-engines.

│ Error: Transform failed with 1 error:
│ error: Invalid version: "20.0.0-pre"
@evanw
Copy link
Owner

evanw commented Dec 20, 2022

The internal version database only has version triples, so there would be nothing to map it to even if esbuild did parse it. Therefore input to esbuild’s target feature is a version triple. You may have to adapt your input to fit esbuild’s format.

For example, you can pass the latest published node version instead of trying to pass an unsupported prerelease node version. If there’s a specific feature that you need to enable that is only supported in a prerelease node version, you can override that with esbuild’s supported setting.

I’m not sure what you’re saying about ignoring engines but if there’s a target that you don’t want included in the list of targets, you can just omit it from the list of targets when you pass that list to esbuild.

@theoparis
Copy link
Author

Oh ok - does that mean its not a esbuild issue and that its an issue on my end with my esbuild configuration?

@evanw
Copy link
Owner

evanw commented Dec 20, 2022

Yes esbuild appears to be working as intended here.

@theoparis
Copy link
Author

Alright my bad, I'll close this issue then.

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