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

Deno support #611

Open
2 of 4 tasks
BlueskyFR opened this issue Nov 15, 2024 · 18 comments
Open
2 of 4 tasks

Deno support #611

BlueskyFR opened this issue Nov 15, 2024 · 18 comments

Comments

@BlueskyFR
Copy link

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

@typed-sigterm
Copy link

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

@web-dev-sam
Copy link

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

@BlueskyFR
Copy link
Author

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!

@web-dev-sam
Copy link

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.

@BlueskyFR
Copy link
Author

Is #526 solving this issue?
Gotta confirm that

@BlueskyFR
Copy link
Author

BlueskyFR commented Dec 8, 2024

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

@danielroe
Copy link
Member

Does it help if you add vue as a dependency?

@danielroe
Copy link
Member

danielroe commented Dec 11, 2024

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.

@BlueskyFR
Copy link
Author

@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 😅

@danielroe
Copy link
Member

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.

@pi0
Copy link
Member

pi0 commented Dec 23, 2024

Probably related (denoland/deno#26700, denoland/deno#23289)

@BlueskyFR
Copy link
Author

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

@BlueskyFR
Copy link
Author

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

@danielroe
Copy link
Member

quite right, this computer still had v2.0.6

@danielroe danielroe reopened this Dec 23, 2024
@danielroe danielroe transferred this issue from nuxt/nuxt Dec 23, 2024
@danielroe
Copy link
Member

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

@BlueskyFR
Copy link
Author

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.

@danielroe
Copy link
Member

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

@BlueskyFR
Copy link
Author

@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

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

5 participants