Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [nuxt.js]

Nuxt.js is a framework for creating Vue.js applications, you can choose between Universal, Static Generated or Single Page application (inspired by Next.js)

614 votes
51 answers
824k views

Why does Prettier not format code in VS Code?

In my Nuxt application where ESlint and Prettier are installed and enabled, I switched to Visual Studio Code. When I open a .vue file and press CMD+ Shift + P and choose Format Document, my file does ...
Billal Begueradj's user avatar
155 votes
6 answers
356k views

Why is 'type: module' in package.json file?

I upgraded the node and built the existing file. But it didn't build, and there was an error. Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: │ │ ~~/nuxt....
Rebbeca's user avatar
  • 1,827
100 votes
10 answers
39k views

Nuxtjs vuetify throwing lots of `Using / for division is deprecated and will be removed in Dart Sass 2.0.0.`

Nuxtjs using vuetify throwing lots of error Using / for division is deprecated and will be removed in Dart Sass 2.0.0. during yarn dev Nuxtjs: v2.15.6 @nuxtjs/vuetify": "1.11.3", "...
kwong ho's user avatar
  • 1,003
94 votes
22 answers
105k views

Vuejs Error: The client-side rendered virtual DOM tree is not matching server-rendered

I am using Nuxt.js / Vuejs for my app, and I keep facing this error in different places: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused ...
asanas's user avatar
  • 4,200
89 votes
9 answers
221k views

How to get route url params in a page in Nuxt2 and 3?

I am using Nuxt.js, and have a dymanic page which is defined under pages/post/_slug.vue So, when I visit the page url, say, http://localhost:3000/post/hello-world, how can I read this slug ...
asanas's user avatar
  • 4,200
88 votes
12 answers
196k views

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in /app/node_modules/@babel/helper-compilation-targets/package.json

I'm having trouble building my nuxt images in a travis CI pipeline. My local environment is ubuntu 18.04 - docker version 19.03.11 docker-compose version 1.24.1 I'm able to build and run my images ...
Simon's user avatar
  • 1,398
78 votes
5 answers
38k views

Difference between Asyncdata vs Fetch

What is the exact difference between fetch and async data. The official documentation says the following: asyncData You may want to fetch data and render it on the server-side. Nuxt.js adds an ...
Yakalent's user avatar
  • 1,152
70 votes
8 answers
143k views

How to get current route name in Nuxt 2 and 3?

I'm using Nuxt.js for building a static website. How to access in component's script code currently displayed route name (I would like to avoid reading direct url from browser location)? Can I ...
lukaszkups's user avatar
  • 5,950
67 votes
9 answers
117k views

“window is not defined” in Nuxt.js

I get an error porting from Vue.js to Nuxt.js. I am trying to use vue-session in node_modules. It compiles successfully, but in the browser I see the error: ReferenceError window is not defined ...
HM.Park's user avatar
  • 827
65 votes
6 answers
111k views

potentially fixable with the `--fix` option

I am creating a app with nuxt.js but everytime I launch the app, gives me the error of eslint and saying "potentially fixable with the --fix option." I did the command npm run lint -- --fix and it ...
Ricardo Moreira's user avatar
62 votes
8 answers
71k views

How to solve "semi-colon expected" warnings (css-semicolonexpected)

I'm trying to use Tailwindcss @apply directive in a <style> tag of a Nuxt.js Vue file. Everything works fine, but I keep getting some annoying red squiggly lines. Please, guys, I need help... ...
Kingsley F.D.'s user avatar
61 votes
4 answers
42k views

How to set lang attribute on html element with Nuxt?

Using the file nuxt.config.js file, head contents can be customized to add some meta, or other things: module.exports = { /* ** Headers of the page */ head: { title: 'awesome title', ...
rocambille's user avatar
  • 15.8k
57 votes
1 answer
34k views

nuxt build --spa vs nuxt generate

What is the difference between nuxt build vs nuxt generate vs nuxt build --spa I am trying to compile three different variations: 1. regular nuxt with ssr 2. prerendered spa 3. spa without ...
Chris's user avatar
  • 13.9k
54 votes
9 answers
41k views

capacitor.settings.gradle' as it does not exist

I am new to Ionic while build the app in android. Its opening a project in Android Studio but while gradle sync its showing the following error Could not read script 'F:\IonicProjects\mis-tracking-...
Jose Vazhappilly's user avatar
48 votes
3 answers
26k views

NUXT- assets and static folder - when to use which?

Being new to NUXT, I am a bit confused about the difference between the assets and static folders. in the documentation regarding this folders it says: every file below 1 KB will be inlined as ...
Randall Flagg's user avatar

15 30 50 per page
1
2 3 4 5
873