6,219
questions
-2
votes
0
answers
14
views
NGINX blocks url paths [closed]
I have a server running nginx. It was configured by default with the service I purchased.
I face an "500 internal server error" whenever I open the website link like 'website.com/page1' or '...
0
votes
1
answer
20
views
How do I prevent Nuxt from going to the Error layout when going to an invalid path?
I'm been looking through both GitHub issues, StackOverflow and the official documentation but I can't seem to find where and how to disable router from going to the error.vue page on going to an ...
0
votes
0
answers
11
views
Vue3 + vue-router + Keep-alive doesn't cache individual article pages by slug in simple blog setup
(I imagine this is a duplicate but I couldn't find anything after searching)
The Problem
I'm making an SPA blog with a listing and article pages. Simple template structure:
App.vue
- Listing.vue --&...
0
votes
1
answer
29
views
How to avoid hard-coding parameter names for usage with a query in vue-router
Currently I save a parameter to URL like this:
const save = async (parameter: LocationQuery) => {
await router.push({ path: '', query: { ...route.query, ...parameter } });
};
called like ...
0
votes
1
answer
19
views
What are the advantages of using the vue-router's route.param.x in computed value
Vue-router docs are giving 2 specific patterns of usage:
const route = useRoute();
// Get the current value
const id = route.params.id;
// Watch for further value changes
watch(
() => route....
1
vote
0
answers
37
views
How can i set a different base for my assets in VueJS Vite
I have a VueJS Vite project which for several reasons has to be built into a /vue/ directory within the root of an existing project.
This is the folder structure:
project
│ Controllers
│ ...
│
...
0
votes
0
answers
25
views
Nuxt 3 Vue 3 project - Issue with routing and loading CSS/JS files after deployment
I created a Nuxt 3 Vue 3 project that integrates with WordPress. Everything works fine when I run the project locally using npm run dev. However, I'm facing an issue when deploying the project by ...
0
votes
1
answer
77
views
TS2339: Property '$router' does not exist on type 'CreateComponentPublicInstance<{}
I got this errors when pipeline ends. The project runs in my desktop locally, but when i run pipeline thats brokens with error. I've already tried downloading all the dependencies again and even tried ...
2
votes
2
answers
59
views
Vue router gives a warning when adding dynamic route: No match found for location with path "/test"
I add a route dynamically and it works but I get the warning below.
"No match found for location with path "/test".
Code Sandbox demo url.
https://codesandbox.io/p/github/eguvenc/...
0
votes
1
answer
22
views
Updating query parm in vue router dynamically
How come one way works and other dosnt. (URL not updating dynamic)
I want to remove parm2 from URL
URL : http://localhost/testpage?parm1=xyz&parm2=xyz&parm3=xyz
Do not work (Output: http://...
0
votes
0
answers
45
views
Testing router.push with vitest and testing-library for vue 3 project
im new in testing components and im trying to test a simple login function. Everything works and tests as it should expect for the push function. This is my login function, which executes whenever you ...
-1
votes
0
answers
26
views
Usage of vue router inside composable (Vue 3)
I have a composable useAppRouting within which methods are created to work with routing, can I use vue-router in this way?
let router: Router
let route: RouteLocation
const getParam = (name: string): ...
0
votes
0
answers
30
views
Uusing REGEX to make ip in URL get a problem with router problem
I want to create a root localhost:3000/ip/{any IPv4 possible}
that's my index.ts (router file looks like)
import {createRouter, createWebHistory} from 'vue-router';
import IPView from "../views/...
0
votes
0
answers
12
views
how to handle validate form to next page use vue router
a form after validate must go to next author page with vue-Router using this code but not validate
<form @submit.prevent="handlesubmit">
<div class="row">...
0
votes
1
answer
37
views
Passing an object to a route with vue-router
Based on this from vue-routers site it seems as though you can pass an object as a prop. However, everytime I try to do this it seems to it fail saying invalid param
My route is defined as follows:
...
0
votes
0
answers
11
views
How can I using common routes for multi-projects
I am using NuxtJs 3 and I have 3 folders containing 3 different nuxtjs projects in which the "packages" folder contains 2 subfolders "cms" and "monitor". When I run the ...
-1
votes
1
answer
51
views
Vuejs guard router failed with infinite loop
Hellop, I have a vue3 app consume laravel 11 api,
I want to develop a router guard to redirect unauthenticated users to the login page. When the Laravel server is not running, the code works and ...
1
vote
2
answers
40
views
Route params are not rendering inside Vue components when using Vue Router
I've got Vue router running with these routes:
const routes = [
{
path: '/',
name: 'home',
params: {
label: 'Home page'
},
component: Home
},
{
path: '/group1',
...
0
votes
0
answers
42
views
What causes Cannot find module '~/pages/index.vue' or its corresponding type declarations. ts(2307) error while using router.options.ts?
see sample image here
I have a nuxt 3 project and I would like to use custom routing with it. I followed nuxt documentation on custom routing and added a folder named 'app' and inside I created router....
0
votes
1
answer
40
views
Navi link list doesn't print path (vue)
I have setup a router link list in Vue:
const router = createRouter({
history: createWebHistory(import.meta.env.VITE_BASE_URL),
linkActiveClass: 'activeView',
routes: [
{
path: '/',
...
0
votes
1
answer
52
views
web.config failed to rewrite index.html when a baseURL is added to sub directory in Vue 3 app with Vite
Currently working on a Vue 3 app which deployed using Azure web apps. When I deployed it to the root and used web.config it worked fine, But I need to add a Base URL. For that, I have added the ...
0
votes
1
answer
31
views
What is the best way to generate menu titles with vue router?
I have the following routes defined in vue router:
const routes = [
{
path: '/',
name: 'home',
params: { label: 'Home' },
component: Home
},
{
path: '/path1',
name: '...
1
vote
1
answer
37
views
beforeEnter navigation guard not triggering when router.push() is called on the same route
I have a search engine which is not properly updating when after having searched something, I try to search something else.
When I want to search something, the search function in the search component ...
0
votes
0
answers
48
views
How to implement a multi-document application based on dialog (modal) windows in VUE?
Now I have a classic SPA application implemented using the VUE, VUE Router, VUEX, Vuetify stack.
Recently I saw an implementation of an interface based on editing data in dialog (modal) windows. As a ...
0
votes
0
answers
47
views
How can I configure routes in a Vue.js application to handle query parameters?
What configurations are required in my routes to handle the query parameter userActivity for a URL like https://somesite.com/feedpool?userActivity=false?
I'm using Vite as a build tool, with the base ...
0
votes
0
answers
34
views
Vue - Is there a way for a route to have the same path, but different name (at least for test purpose only)?
I have the following vue-router definition in my vue app:
export const routes = [
{
path: '/test/:id',
name: 'test',
component: () => import('@/components/MyComponent.vue')
}
]
And ...
0
votes
0
answers
20
views
Vue.js Vuex State Not Syncing Across Tabs and Direct URL Access
I have a Vue.js application with a login component and a settings page. When I log in and navigate to the settings page via the menu within the login page, the Vuex store updates correctly, and I can ...
2
votes
1
answer
89
views
[Vue warn]: Failed to resolve component: UserBasket
I ran into an issue that had me scratch my head for a few days now. I am doing a application with vuejs3 frontend.
For all the code I provide I removed the most other code and kept what I think is ...
0
votes
0
answers
100
views
Return a Rewrite in Nuxt3 with Nitro server middleware
For a nuxt3 app with the following folder structure:
pages/
├── foo.vue
└── bar.vue
server/
└── middleware/
└── index.js
How can a rewrite be returned from index.js?
Here is a link to a live ...
0
votes
1
answer
49
views
Best way to implement conditional tabbed routing in vue
What I'm trying to implement is routing with tabs where the available tabs change depending on the user type (upon authentication the user type gets stored in a pinia store).
This is what I ended up ...
0
votes
0
answers
100
views
TypeError: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'
I am new to vue.js and i'm trying to upgrade a relatively big vue 2 project to vue 3 and after i updated all the necessary files, i came across this TypeError: Failed to execute 'insertBefore' on '...
0
votes
1
answer
95
views
Nuxt 3 child route with dynamic parameter not getting active-class
I have the following folder structure. And the following pages are of important
/workshops and /workshops/workshop-1.
The issue I'm having now is that my active-link works for /workshops, but not for ...
1
vote
1
answer
52
views
How to unit test vue beforeRouteUpdate hooks
I have the following vue component, which uses onBeforeRouteUpdate hook to call the init() method when the route param changes (test/a -> test/b).
The following stackblitz instance shows the output ...
0
votes
1
answer
31
views
How can I access router props passed in to Vue Router in function beforeEach
I have a Vue Router routes setup like so:
[
{
path: '/regions',
name: 'regions',
component: () => import(/* webpackChunkName: "regions" */ '../views/RegionsView.vue'),
...
-1
votes
1
answer
48
views
How do I mounted a object data using axios in vue js
this is my menu page:
<div class="col col-md-3" v-for="(product, index) in products" :key="index">
<div class="card">
<...
0
votes
1
answer
30
views
In vue3, why router.currentRoute and router.currentRoute.value printed value different?
When I use the address to enter the /npc page or refresh the page in the /npc page, I encounter the following situation.
Code:
router.beforeEach(async () => {
console.log(router.currentRoute, ...
0
votes
1
answer
44
views
Vue router not changing or responding to URL
Navigating from one page to the other works, but this change is not reflected in the URL path. Trying to enter a page directly from the URL (i.e. localhost:8080/explore) also just loads the home page.
...
1
vote
1
answer
57
views
How to create a simple component inline?
I have a component that looks like this:
App.vue
<template>
<RouterView />
</template>
I would like to not have a file for such a simple component. How would I go about creating ...
1
vote
1
answer
48
views
Escape colon in Vue router wikipedia-style
Context
I've been trying to replicate what wikipedia does with their URL
It works something like
/[Namespace]:[PageName]
/[PageName]
So if I go to /randompage I get as params:
namespace: ''
page name:...
0
votes
0
answers
41
views
Facing issues in nested routes in Vue-3
I am creating a simple CRUD application for users based on different roles, but I'm facing issues with nested routes and component rendering. I have carefully reviewed their official documentation, ...
0
votes
0
answers
17
views
Vue routeguard prevents supabase SIGN_IN event to occur after OAuth redirect
I've followed this tutorial on vueschool https://vueschool.io/articles/vuejs-tutorials/use-supabase-auth-with-vue-js-3/ for supabase auth in vue3 app.
For signin i'm using this method:
const ...
0
votes
0
answers
93
views
Problems serving Vue Vite build through Express, Failed to load module script: Expected JavaScript module
I am currently trying to test my Nodejs (Vue, Vite, Express) web application in production but am having trouble serving specific routes to the client.
On some pages i recieve
Failed to load module ...
0
votes
2
answers
45
views
Vue Router Not Reflecting Routes, Stays on Home Page
I'm working on a Vue 3 project and encountering an issue where the Vue Router is not reflecting the correct routes. When I navigate to any route, such as /cars or /admin, the URL does not update and ...
1
vote
0
answers
98
views
Nuxt 3 Dynamic Routing Conflict with Nested and Single Slug Pages
I am building a project with Nuxt 3, However, I am facing a routing conflict with my current setup. Here is my folder structure:
pages/
[types]/
[slug].vue
[...categoryPath]/
[slug].vue
[...
0
votes
0
answers
44
views
vue-router scroll doesn't work properly based on user action
I created following page:
<template>
<div>
<v-row>
<v-col>
<div id="c1">
<h2>Chapter 1</h2>
<div><!-...
0
votes
0
answers
26
views
Cannot find module '../page/home/index.vue' or its corresponding type declarations.ts(2307)
when i use vue3+ts ,my router are right,but it's tips that cannot find module '../page/home/index.vue' or its corresponding type declarations always!
I was used hash modules,not history modules.
i ...
0
votes
1
answer
22
views
error get data to one data using vue router and laravel
I learning Vue in use Vue router, make crud SPA application
component to show all data:
<template>
<div>
<table class="table table-striped">
<...
0
votes
1
answer
100
views
v-slot can only be used on components or <template> tags. Using <router-view> (plugin:vite:vue)
<router-view v-slot="{ Component }">
<component
:is="Component"
class="container"
ref="componentRef"
/>
</router-view&...
0
votes
1
answer
40
views
Vuex and Vue Router - double condition on beforeEnter not working
I have double condition in beforeEnter and nobody can enter to right place. Is there a limit in conditions or what? :(
my code in the router file:
const routes = {
path: `${routerConfig.preRoute}/...
0
votes
1
answer
63
views
why in vue3, the transition component will cause the router to fail to jump?
My router configuration:
{
path: '/user',
name: 'user',
component: Layout,
redirect: '/user/detail',
meta: {
title: '111',
},
children: [
{
path: '...