nuxt/cli

Deno support

Opened this issue ยท 18 comments

Describe the feature

Hi! It would be super nice to be able to develop with/install Nuxt using Deno, as the only listed options so far are npm, pnpm, yarn & bun ๐Ÿ˜Š

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

Do you mean add Deno starter to docs? Nuxt is compatible with Deno.

He probably meant Nuxi package manager options when creating a new project. When selecting npm and then trying to run deno task build it throws these errors a bunch:
Image

Yes I meant that! And also to use deno instead of npm to install dependencies, so to add abother option "deno" alongside bun, nom, yarn and others.
Because I don't want to have to install npm if I already have deno.
And I am getting the same error yes!

After some source code delving I found out you can build nuxt using Deno by adding nitro: { preset: 'deno' } to your nuxt config. However I did not find a way to make it work for the development server so that it works. I assume that there isn't support for that yet. The issue could be related to some fs.stat or fs.statSync not receiving proper arguments (deno-node polyfill). But since the stacktrace is too small I don't know much more.

Is #526 solving this issue?
Gotta confirm that

Well when using the Nuxt UI starter with Deno I am getting a 500 server error for now:

[nuxt] [request error] [unhandled] [500] Cannot find module 'vue'

Just after running deno task dev

Does it help if you add vue as a dependency?

Deno seems to work fine in a new project with the latest CLI changes.

I checked UI template and installing vue does resolve the issue, so I added it to package.json.

@danielroe can you please reopen? This does not look fixed to me.

When creating a new project using deno run -A npm:nuxi@latest init -t ui, and then deno task dev I get this:
Image
instead of (same project but using Yarn instead of Deno):
Image

So I think this issue should still be opened ๐Ÿ˜…

you're right, there's an issue:

Image

would you raise it upstream with deno? this doesn't seem like a nuxt bug to me.

@danielroe how are you getting that? I don't have any error on my side:Image

Are you sure you are using Deno 2.1.4? I think your issue might be already fixed

quite right, this computer still had v2.0.6

transferred to CLI to handle receiving ERROR [unhandledRejection] Unknown signal: 0 when exiting dev server

Alright! I agree on that but this specific exit code isn't that important to me, the main problem is the rendered page and I have to admit I have no clue on how to debug that.

@BlueskyFR the css issue is unlikely to be nuxt related - it could be tailwindcss or nuxt/ui related - maybe raise there?

@BlueskyFR the css issue is unlikely to be nuxt related - it could be tailwindcss or nuxt/ui related - maybe raise there?

why not, how can I debug that in your opinion? Since we are not really seeing any error here tbh