Hermes Alves
Explore posts from serversNuxt 4 - compability version (node:81791) Warning: To load an ES module, set "type": "module" in...
Hello everyone,
I'm encountering an issue while building a Nuxt 3.14.159 project using Bun. The build process fails with the following error:
The package.json includes "type": "module".
The nuxt.config.ts specifies compatibilityVersion: 4 and compatibilityDate: '2024-04-03'.
8 replies
How to Add Dynamic Pages/Extensions in Nuxt 4 at Runtime? Need Ideas for My Bun-based Open project
Hey everyone, I'm working on a backend, and the API and data management is being done with Nuxt (compatibility mode for version 4). I could use some help with architecting a part of the system where users can add new pages or even a new application, inheriting from the existing app/core in Nuxt 4.
Initially, I thought about using layers, but it turns out that inserting layouts via
nuxt.config.ts
doesn't allow for this to be done at runtime. Has anyone faced something similar or have ideas on how to solve this?
Here's a quick overview of the project, which is built with Bun using bun workspaces:
The idea is that through the studio interface, users can create new tables in the database, and the API is automatically generated with Hono. It's similar to Directus, but due to licensing issues, I can't use Directus in my open-source project, so I'm building my own solution.
My current challenge is to create a way to support dynamic extensions inside studio at runtime. Do you think a plugin-based approach with Nitro could work? Or is there another strategy you'd suggest to handle this?
I appreciate any ideas or experiences you can share! 🙏
Repo link: https://github.com/back3nd-team7 replies
localhost:3000/api/analytics import it's not accepted? @google-analytics/data
[13:05:34] ERROR Cannot resolve "unenv/runtime/node/string_decoder/index/" from "/home/xxx/node_modules/.pnpm/[email protected]/node_modules/readable-stream/lib/_stream_readable.js" and externals are not allowed!
Localhost work's fine. But deploy for cloudflare pages didn't work:
What did I do wrong?4 replies
TWA or Android App, how can build one?
I found a article about generating Trusted Web Activity from Nuxt.js app, but only for nuxt 2. This is possible make a TWA for Nuxt 3?
https://blog.logrocket.com/how-to-build-a-twa-android-app-out-of-your-nuxt-js-pwa/
2 replies
How can i use the named slot templates with default layout?
Only home is a different layout, all the internals of the site are the same, so I would like to use:
<NuxtLayout name="home">
for initial, but in the internals I would like to use the default layout.
But it doesn't work:
<template #preContent>
<div class="sum-class">
SomeContent here
</div>
</template>
1 replies
NuxtLoadingIndicator duplicate my layout? I'm using NuxtLoadingIndicator inside app.vue
Hi there,
I have the layout/default.vue
I was using loading within the layout, and I was replicating the layout. They had two menus, for example. Now I'm using it inside app.vue and it doesn't replicate the home page but it replicates the other pages. Weird.
How do I prevent it from replicating?
1 replies