cococore
cococore3mo ago

i trying to deploy deno2 . it fails

first deno.lock version is 4 but editor says it must be v3. after i change v4 to v3 it says deno.exit is not allowed
3 Replies
cococore
cococoreOP3mo ago
confirmed. Deno2 creates deno.lock version 4. Extension says it is wrong and version 3 must be used. When super simple code used with version 4 deploy fails. When super simple code used with version 3(manually changed) deploy works. With version 3 changed in deno.lock manually, after project was created using deno2-rc10, the not super simplecode fails. it says that Deno.exit can not be used. In same time on dev environment it works. Also in yml file all versions of deno is v1.x
marvinh.
marvinh.3mo ago
If you switch between Deno versions you might need to restart the extension in vscode (or restart vscode itself). The extension might be running the previously installed version which can lead to conflicts. Deno Deploy doesn't support Deno 2 yet, but will soon. Since Deploy is a serverless platform, some APIs like Deno.exit() are not supported. The list of supported Deno.* APIs can be found here https://docs.deno.com/deploy/api/#deno-apis
cococore
cococoreOP3mo ago
@marvinh. of course vscode restarted. Also the same codebase did not conflicting with deno1 based and deployed project, (include deno.exit code). But maybe i miss something And if i remember i used denokv, which is unstable too. And docs say , green light only for stable api for deploy. Thank you to say straight way deno 2 not for deploy, or i was frustrated, and kill lot of hours to try everything

Did you find this page helpful?