kogratte
TOO_MANY_REDIRECT - How to track the culprit?
Hello guys.
Mostly from nowhere, or at least nowhere I can look at, I end up having 407 redirection when loading my app.
I'm not able to identify the culprit, and was wondering which will be the best path to track and understand the root cause.
Any tips, inspect flag or something I can use to understand what nitro is doing under the hood?
#nitro #redirect #debug
13 replies
Deployment through API Manager
Hello guys!
We're working on a nuxt3 app, with classic static / api elements.
We're hosting our static content to a CDN, and our backend is running behind a NodeJS server on our own.
The current NodeJS server is our main entry point, as our website directly point to it. From here, the index file is loaded and all subsequent dependencies are fetched from CDN. Api calls are handled by the same server.
We know, almost for sure, we'll need later to expose those apis to our customers, which means we'll need to secure them behind an api manager.
Is that something which has been already done somewhere?
I guess we'll need to deploy two servers. A first one being a very dumb server to serve only for landing purpose, and which will only serve the root index file (+ runtime config), and another one, being private this time, exposed behind our api manager.
I wonder if they're existing flags which may be used in order to tell nitro "eh, in this situation, do not serve api nor static assets". Is there an equivalent to NITRO_SERVE_STATIC = false for api routes?
1 replies
Unresponsive navigateTo
Hello guys!
Has anyone ever seen, an unresponsive navigateTo call?
The view is stucked on the loaded screen, and the url isn't updated.
Something else really weird, a <a href> is working well, but a <v-list-item :to> isn't...
I do not have any idea re. how to debug the root cause...
2 replies
Fetch referential at build time
Hey there! This question seems to have been asked twice, but none of them was helpful...
I'm working on an electron app which is supposed to be shipped with a copy of a referential, given at build time.
What I would like to know is how can I leverage on the hook system to fetch this data and inject it into the app, like a "fake file".
This behaviour looks close to what is done with .nuxt...
2 replies
Hashmode, dynamic asset url
Hey there!
I'm using a component from a layer which use a public image, which src is based on some conditions.
On my component, it looks like somethings like this:
Once I run
npx nuxi generate
, everything seems fine and app is running, BUT, where my custom component is loaded, image urls are not converted into ./$src
.
I guess as image source are defined at runtime, url cannot be converted at buildTime. Is there a way for me to detect that hashMode has been enable, then provide the expected source (ie, ./$src
)?2 replies
Referential fetching
Hey there!
I'm working on a static app which intend to mimic some behaviours from our online platform. In order to do so, we'll need to fetch our referentials at build time.
What would be the best way to do it? Use some bash script to fetch json, then build on top of them? Use virtual files and nuxt hooks? I've not been able to find any example combining hooks and async calls...
1 replies
Cannot extend layer
Hello guys!
We're working on a brand new product how intend to use the same building blocks than our main app. In order to do so, we want to move common blocks (aka design system, itself based on a layer), onto a shared and reusable package.
To achieve that, we create a new layer using nuxi new, then add our first "inner layer" (design system), which itself extends a "child layer", based on vuetify.
Our hierarchy looks like that:
/
/layers/design-system
/layers/design-system/layers/vuetify
We've been able to use our package through "nuxi dev", we've been able to build it using "nuxi build", and even to pack and publish it through a private npm repository.
Now our foundations looks strong, we're trying to install it on our older project as a regular npm dep, and extend is from our main app. It looks like below:
But... Rather than working out of the box, nuxi is complaining about `Cannot extends from our_shared_package". I read the documentation again and again, check the package content and so on, and everything looks fine.
We do not have a clue concerning what's not going right. Is there a way for us to deep dive into our issue and understand what need to be fixed, where and why?
2 replies
Reuse pages?
Good evening!
I have a set of pages I would like to use in different locations, without duplications.
Let's imagine the global structure.
/my-module/
/my-module/a.vue
/my-module/b.vue
I now want to use those pages in a different context.
/context/my-module
/context/my-module/a.vue
/context/my-module/a.vue
Behaviour should remain the same, only context is changing.
As those are pages, not components, I'm not sure how to achieve this.
Any clue?
#layer #pages #reuse
10 replies