DENO_VERSION_RANGE semver constraint is too loose
willsr opened this issue · comments
The DENO_VERSION_RANGE
constant is currently set to '^1.37.0' which would satisfy anything from 1.37.0 - 1.99.x.
There is a bug in versions 1.40.x of Deno (See: denoland/deno#22109) which is causing edge functions to fail that rely on certain external modules.
Is it possible to set a fixed Deno version for use in local development? (apart from just manually downloading the desired version into /Users/User/Library/Preferences/netlify - which I can't find any documentation for)
Also is there any way to know the current Deno version running in the Netlify hosted environment?
Hey Will! Looking through the code, I don't see a way of fixing the Deno version, no. If i'm understanding denoland/deno#22109 correctly, this doesn't have a super widespread impact. If Deno intends to publish a fix for that this week, then I don't think we can provide a workaround earlier than that. In the meantime, the workaround you mentioned sounds like an "alright enough" solution. Alternatively, you could go into your node_modules
directory and manually edit the DENO_VERSION_RANGE variable.
That's not a beautiful workaround, but if Deno publishes a fix this week, then it should be alright. Let me know if this works for you!
Ok, thanks for responding. Is there a way to to know the current Deno version running in the Netlify hosted environment for edge functions? Or a way to set it manually (similarly to the Node.js version)?
In the hosted environment, Deno Deploy is managing the version updates - it's not possible to change the version there, no.
It looks like Deno has completed the mentioned issue - I guess it'll be fixed in their next Patch release.