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
Why isn't the API_PORT variable being loaded? Is there something I'm missing?
I'm trying to load an environment variable API_PORT using Deno and the @std/dotenv module, but it’s not being loaded correctly. The variable is undefined when I try to access it with Deno.env.get('API_PORT'). Here’s the code:
Why isn't the
API_PORT
variable being loaded? Is there something I'm missing?15 replies
CDCloudflare Developers
•Created by Hermes Alves on 11/27/2023 in #general-help
typescript sdk for KV?
Could you tell me if there is a taipescript SDK for kv because I couldn't find it. Just the rest API endpoint I found it.
11 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
CDCloudflare Developers
•Created by Hermes Alves on 8/30/2023 in #pages-help
Setting Up Custom Domains for Different Branches in Cloudflare Pages
6 replies
CDCloudflare Developers
•Created by Hermes Alves on 8/9/2023 in #pages-help
A git repository for multiple pages? /workers-and-pages
I have only ONE code, in ONE repository on github. There are four (4) sites, with the same code, what changes is the backend, via environment variables.
Is there a way I can point 4 domains, to put 4 sites online with different backends? The backend I provide in the environment variable, however it only has TWO (2) environments, production and test, I need more.
How would I do this in cloudflare workers-and-pages?
1 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