Nitro in Deno
I have created a new Nitro project using
deno run -A npm:giget@latest nitro nitro-app --install
. It was successfull but after trying deno run dev
I get an error saying:
Is there any fix for that or is it a bug in Deno itself?2 Replies
Hi @w7a9q. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the information provided in the knowledge sources, I can offer some insights about using Nitro with Deno, but I don't have specific information about the error you're encountering. Let me explain what I know:
Nitro does support running applications with the Deno runtime, as mentioned in the Deno runtime documentation (https://nitro.unjs.io/deploy/runtimes/deno). However, the process described there is slightly different from what you've attempted.
According to the documentation, the recommended steps are:
1. Build your Nitro server using Node.js with the Deno preset:
2. Then start the production server using Deno:
The error you're encountering seems to be related to Deno trying to read a file or directory path, but it's not clear why this is happening during the
deno run dev
command.
It's worth noting that the documentation doesn't mention a dev
command for Deno. The example provided is for running the production build.
Given this information, I would suggest trying the following:
1. Make sure you have built your project using the Deno preset as mentioned above.
2. Try running the production server using the command provided in the documentation.
If you continue to encounter issues, it might be worth checking if there's a bug report for this specific error on the Nitro GitHub issues page (https://github.com/unjs/nitro/issues). If not, you may want to consider opening a new issue there with the details of your setup and the error you're encountering.
Unfortunately, I don't have enough information to determine if this is a bug in Deno itself or an issue specific to Nitro's Deno integration. More investigation would be needed to make that determination.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1216792075425677402> Kapa.ai is still learning and improving, please let me know how I did by reacting below.