Questions tagged [nuxtjs3]
Tag for questions related Nuxt3. More info can be found here: https://nuxt.com/
1,293
questions
0
votes
1
answer
12
views
Why is my computed value returning an empty string when it has a valid ID in the console? - Nuxt 3 with useLazyFetch() and reactive queryParameter
I try to use useLazyFetch() in Nuxt 3 with reactive queryParameter. This parameter lose reactivity and my requests fail.
I create my own composable
import { useLazyFetch } from 'nuxt/app'
import { ...
0
votes
1
answer
19
views
Trouble loading images from relative paths in Nuxt.js 3
I'm currently developing an application using Nuxt.js 3, and I have an array of objects that contains information about team members. Each object has a profil_path property that holds the relative ...
0
votes
1
answer
32
views
How to create a global component in Nuxt.js 3?
I have a nuxt 3 project that has multiple layouts. I'd like to create a global component that runs once when the client first requests my site. And I don't want it to unmount when the user changes ...
0
votes
1
answer
27
views
Nuxt 3 - after response middleware
I have a use-case where I would like to call a middleware after the response went through the route handler. The docs describe that the standard server middleware only runs BEFORE the request is ...
0
votes
1
answer
20
views
Nuxt3 component library as a module
Looking for some help on a Nuxt module.
I have a component library (the module) which uses an npm package, flat, https://www.npmjs.com/package/flat
When I use the component library in isolation, it ...
0
votes
0
answers
23
views
VSCODE volar extension has no effect
I am using NUXTJS 3 so I have installed volar extension pack
but I have noticed that there is no autocompletion in typescript and .vue files what is the problem?
What I am tried:
Restart VSCODE.
...
0
votes
1
answer
38
views
Loading spinner does not show while navigating between pages in a Nuxt 3 application
I have a Nuxt 3 + Vue 3 application. I have 2 pages
pages/index.vue file as my home page
pages/folder1/folder2/[dynamic_route].vue
When navigating from my home page to the other page, my loading ...
0
votes
0
answers
16
views
Nuxt3 and server routes: Data streaming in chucks on localhost, but not when deployed to Netlify
I built a demo chatbot using Nuxt3 and the Open AI API. I am streaming the data in chunks and it works nicely on localhost. But, when I deploy to Netlify, it is dumped all at once in the UI.
Why does ...
0
votes
0
answers
10
views
Getting two different responses in Nuxt 3, fetching external API
i want to create a request on my jira test instance using Nuxt 3. On my .vue file there should be the tag. into this tag i will use the provided function useAsyncData from Nuxt 3.
As I interpret the ...
0
votes
0
answers
20
views
Layout not updating after navigation in Nuxt 3 middleware with separate login layout
I'm facing an issue in Nuxt 3 where the layout does not update correctly after navigation in a middleware, especially when using separate layouts for the login page and other pages. Here's an overview ...
0
votes
0
answers
27
views
Nuxt instance unavailable in plugins
I want to add google analytics tracking to my app, and I want to connect user UID with activity. So I need to run script every time page is loaded to connect it. From what I know, best way to do this ...
0
votes
0
answers
14
views
Create Google Auth in Expressjs & NuxtJs
I want to create google auth system in expressjs and nuxtjs for users. when in nuxtjs, we click "login with google", it opens a popup window, and we call the express route to start google ...
-1
votes
0
answers
14
views
Nuxt FATAL Cannot set property 'stage' of undefined error
Nuxt FATAL Cannot set property 'stage' of undefined error
Anyone faced this issue on Nuxt FATAL Cannot set property 'stage' of undefined error
When I upgrade node 12.16.1 to 14.18.0 it's returning ...
0
votes
0
answers
45
views
Laravel 10 Sail with Nuxt 3 and Vite: Browser can't connect to 24678
I have a monorepo with Laravel 10 and Nuxt 3 being installed to a subdirectory. I don't want to run the nuxt dev server from my host. Instead I want to run it using Laravel Sail, because Sail already ...
0
votes
1
answer
26
views
How to use Server-Side-Rendering (SSR) in NuxtJS?
I tried to change a NuxtJS app skeleton so that it uses Server Side Rendering (SSR).
It does not work and I could not find any further documentation besides the SSR-setting in the nuxtJS-config-file.
...
1
vote
1
answer
227
views
Getting 500 internal server error for Nuxt 3 and Pinia
I installed Pinia in Nuxt 3 following the Pinia documentation. But while running the project I am getting this error.
The requested module 'vue-demi' does not provide an export named '...
0
votes
0
answers
18
views
Alternate way to pass graphql auth in nuxt3 using apollo client?
I'm currently using the following config in my nuxt.config.ts for apollo client, however I receive the error:
The 'credentials' field on 'RequestInitializerDict' is not implemented
apollo: {
...
1
vote
1
answer
64
views
useFetch() response value not accessible
I'm using Nuxt's useFetch method to fetch data from the API, and I've come across the issue of not being able to access response data immediately:
onBeforeMount(() => {
useFetch('/listings')
...
0
votes
1
answer
50
views
Nuxt 3 server-side pagination with useFetch
I'm using Quasar UI and Nuxt 3. I have an existing API that I can access. Have nuxt2 project that works fine with Axios but trying to now use useFetch as per Nuxt3 docs.
Quasar's qTable has pagination ...
0
votes
0
answers
10
views
EINVALIDPACKAGENAME using socket.io-client in firebase Nuxt 3 app
I have a Nuxt 3 application that uses socket.io-client. The app builds and runs fine during development with a vanilla nuxt build process.
When I attempt to build and deploy to Firebase using the &...
0
votes
0
answers
9
views
Accessing Route In Validation/Middleware & In Normal Code Without Duplication?
I have a blog using Nuxt 3 and Nuxt Content. My posts are divided into several categories. For each category, there is a page listing all posts belonging to this category. I do this with a generic ...
1
vote
1
answer
35
views
getting data from API with useFetch. How to destructure to get meta and data objects and extend Respone type to include
Learning Nuxt3 and first time using fetch as opposed to Axios.
I have an API that returns data with 'meta' object and 'data' array.
Fetch expects response to only include a single 'data' object with ...
1
vote
0
answers
25
views
Nuxt3 / Netlify - Form not sending data (no errors)
I’ve seen a lot of questions regarding this online, but I can’t find a solution that works.
I’m trying to get form submission to work with a Nuxt 3 app. I have added everything necessary (from Netlify ...
0
votes
1
answer
33
views
How to get index in Vue slots
In the parent component I render a Carousel component (child component) and pass the content of the slot inside.
Inside the carousel component, I want to get the index of the slot content and pass it ...
0
votes
0
answers
36
views
How can i get cookie on server side server/api on page reload Nuxt 3
Hi I am using Nuxt 3 I am trying to set and get cookie on server/api. I have two pages index.vue and about.vue and two server/api files setcookie.get.js and getcookie.get.js. In the index.vue making ...
0
votes
1
answer
42
views
Nuxt3: Detect when component is unmounted?
I need to clear some intervals before component is unmounted. In Vue there is beforeUnmount(...). What is the equivalent in Nuxt3?
0
votes
0
answers
18
views
Apply classes or styles to JS Proxy Objects
Using Nuxt 3 I have a v-for with a ref assigned:
<div v-for="item in content" ref="theItems" />
then I try to loop with a for of:
<script setup>
const props = ...
0
votes
0
answers
16
views
nuxt3 dynamic components not loading in loop
I have a page that looks like this,
<template>
<div class="wrapper">
<NavigationSiteNavigation />
<main class="">
<!-- &...
0
votes
1
answer
49
views
Nuxt 3 - Aliases - How can aliases be used inside a config file?
When trying to importing files through aliases at the configuration (nuxt.config.ts), an error occurs: Cannot find module '~/....
There is an example: codesnadbox.io
Short example
nuxt.config.ts
...
0
votes
1
answer
54
views
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'cookie-es' | After Nuxt 3 build in Windows 10
The issue
The Nuxt 3 build exports module "cookie-es" as a reference, symbolic link or how it's called in Win. The reference will be empty after copying.
I propose a question
How do I tell ...
0
votes
0
answers
17
views
How to change amcharts5 gauge chart to make it fill up to a value
I am currently using the amcharts5 gauge chart in a project for work and I have a functioning chart which looks like so:
amcharts gauge chart with clockhand score](https://i.stack.imgur.com/ev6lp.png)
...
1
vote
1
answer
66
views
What is the proper way to include chart.js with Nuxt 3.4?
There are some tutorials out there (e.g. https://medium.com/geekculture/chart-js-in-nuxt-js-how-to-implement-c255a2657b02) that show how to integrate Chart.js with an earlier version of Nuxt 3 or even ...
0
votes
1
answer
37
views
How to await/access nested proxy values in Nuxt plugin?
I have a plugin for PostHog. In this plugin I want to initialize my Pinia store, so I can use the store data. The problem that I have is that the plugin loads before my store is loaded, so I receieve ...
0
votes
0
answers
43
views
How to Resolve Nuxt3 Routing Jump with Warnings
[nuxt] Calling useRoute within middleware may lead to misleading results. Instead, use the (to, from) arguments passed to the middleware to access the new and old routes.
enter image description here
...
0
votes
3
answers
136
views
Vue form @submit.prevent does not work in mobile browsers
I have a Vue 3 component (a Nuxt 3 environment) with just a simple form which I am trying to prevent the default behavior of reloading the page. As many times in other Vue projects I am using @submit....
0
votes
0
answers
31
views
element plus library for vue 3 / Nuxt 3 collapse component scroll to open panel
I'm hooking into the @change event on the el-collapse component and trying to scroll to the top of the open / active panel. It is a bit janky sometimes and scrolls to the middle of the content and NOT ...
1
vote
2
answers
150
views
Post form data and file in one useFetch call in Nuxt 3
I want to post form data (uncluding strings, numbers, arrays) AND a file to backend using one useFetch() call, in TypeScript.
What I tried
If I add strings and a file to the FormData instance, all ...
2
votes
1
answer
35
views
Nuxt 3 Nodemailer module Elasticmail configuration typescript error. 'No overload matches this call.'
I am integrating an elasticmail to my app using the nodemailer module. Here is my configuration
const config = useRuntimeConfig()
const transporter = nodemailer.createTransport({
host: config....
0
votes
1
answer
26
views
NUxtjs3 [nitro] [dev] [uncaughtException] TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or
I updated nuxtjs application version 3.2.0 to 3.4.3. now when a client call server api (which calling a backend server) i have this exception
[nitro] [dev] [uncaughtException] TypeError [...
0
votes
1
answer
31
views
How to use NuxtLink without writing query every time?
I have a problem with Nuxt 3. Here is the code:
<NuxtLink
:to="{
path: '/',
query: useRoute().query,
}">Link</NuxtLink>
How to use this code without writing query, like the ...
1
vote
1
answer
35
views
How to add a custom TinyMCE plugin with Vue3 (Nuxt) using the PluginManager
I have a Nuxt3 app with TinyMCE for which I already created a standalone plugin for inserting LaTeX that works (latex.min.js).
Is it possible to create a TinyMCE plugin that interacts with my web app ...
1
vote
1
answer
39
views
Nuxt 3 CreateError does not show the 'cause' parameter. Server side
Why does the createError function not showing all the parameters? Based on the documentation, the parameters available are err: { cause, data, message, name, stack, statusCode, statusMessage, fatal }
...
1
vote
3
answers
57
views
Vue/Nuxt 3 - Cannot set properties of null (setting 'textContent')
I have a function that is supposed to change words every few seconds. Everything works as expected, but I get following error every few seconds in the VSC console:
TypeError: Cannot set properties of ...
0
votes
1
answer
49
views
TypeScript in Vue & WebStorm
I'm having a bit of a weird issue with TypeScript and Vue3 in WebStorm.
Currently I'm running a Nuxt3 project and have a component (using script setup syntax) - however, it doesn't seem like my ...
1
vote
2
answers
165
views
Nuxt 3 composables suddenly undefined
I set up a composable for the currentYear under composables/getCurrentYear.ts
export const getCurrentYear = () => {
return new Date().getFullYear();
}
in my Footer component I defined it as
&...
1
vote
1
answer
98
views
Nuxt 3 How to implement CORS?
This is related to my other question about Nuxt 3 security for API's. How do I add CORS? Currently, using the Helmet module is not working for me.
This is the link in my previous question
Nuxt 3 ...
1
vote
1
answer
39
views
Nuxt 3 Prevent Other Wesbsites, Applications, or Domains from accessing my APIs?
I am pretty new to Nuxt, I tested the API that I created under the localhost:3000 to another local host which is localhost:3001 . I tried accessing the API that I created in localhost:3000 like this.
&...
0
votes
2
answers
85
views
How do I process form data for a file upload as FormData on the server side of a Nuxt 3 handler application
I am sending data to a Nuxt 3 server side defineEventHandler. The data is correctly sent to it as a multipart/form content-type. However, I want to get the data in the FormData sent to ...
0
votes
0
answers
137
views
How to add custom service worker to Nuxt 3 with vite-pwa?
I am trying to glue together a Nuxt 3 PWA with vite-plugin-pwa, more specifically @vite-pwa/nuxt. I installed the module and set up basic configuration (I basically followed this video)
What I want
...
0
votes
1
answer
37
views
Nuxt 3 : How to redirect all 404 to home page with a 301 (SSR)
I am searching how to catch all my 404 pages on my Nuxt 3 project and redirect them using a status code 301 to the home page (using SSR).