Repositories

Feed

uptownhr

uptownhr posted a new bug report

nuxt.js • 2 hours ago

bug error.vue infinite loop

Version

v2.1.0

Reproduction link

https://codesandbox.io/s/vvz3072j15

Steps to reproduce

  1. Create custom error.vue that contains an error
  2. trigger error.vue
  3. notice the infinte error loop

What is expected ?

something catches the error

What is actually happening?

catches and attempts to load the error.vue infinitely

Additional comments?

The main issue is that the API for the error prop being passed to the error.vue page has changed. Before 2.x, it was expected that error.response was available. Anybody that was using this, ie: error.response.data now have this error. There should be a notice to nuxt users so they are aware of this API change.

Ayiga

Ayiga posted a new bug report

nuxt.js • 4 hours ago

bug Object.assign can get emitted via serializing the Nuxt State (Serialized Session)

Version

v2.2.0

Reproduction link

https://codesandbox.io/s/vqnjopy7n0

Steps to reproduce

Visit the reproduction link on codesandbox.io.

I have output the inject Nuxt state, and I have bolded any occurrences of Object.assign.

What is expected ?

window.__NUXT__ should be assigned to via a JSON-esque syntax that provides minimum compatibility requirements, or that the output is transpiled before being written to the page.

What is actually happening?

Object.assign is in the output of this injected serialized state as it doesn't get transpiled.

This breaks compatibility with Older browsers (Specifically Internet Explorer 11)

Additional comments?

If a plugin exists that will modify the nuxtState, then Object.assign will be injected into the global Nuxt state via the rendered due to devalue or @nuxtjs/devalue .

This is the line that the serialization gets emitted by

This is the line that adds to the state in my example

This is the line in devalue that is emitting Object.assign

egidioFrat

egidioFrat posted a new feature request

sitemap-module • 5 hours ago

idea An option for trailing slash would improve SEO

What problem does this feature solve?

Missing trailing slash on URL of a directory force github pages to redirect HTTPS to HTTP.
https://github.com/isaacs/github/issues/289

What does the proposed changes look like?

It could be an option to add trailing slash to static URL in sitemap.xml

Magnum5234

Magnum5234 posted a new bug report

nuxt-i18n • 9 hours ago

bug nuxt-i18n <-> vuelidate dynamic validation issue

Version

5.4.3

Reproduction link

https://codesandbox.io/s/vy54y194yy

Steps to reproduce

Apparently there seems to be an issue that the dynamic validations are no longer triggered, when "nuxt-i18n" is used.

I reproduced the issue here:
[broken]
https://codesandbox.io/s/vy54y194yy

[working]
https://codesandbox.io/s/ywxknqooxv

The example is the one used in the vuelidate documentation: https://monterail.github.io/vuelidate/#sub-dynamic-validation-schema

The only difference between the working and broken example is that in the working one the module for nuxt-i18n is commented out in the nuxt config.

What is expected ?

The expected behavior is that the validation configuration should change when the checkbox is clicked.

What is actually happening?

Validation configuration does not change.

Additional comments?

Since I'm not really sure who can fix this issue I created this issue for nuxt-i18n and vuelidate.

Thanks in advance :)

Magnum5234

Magnum5234 posted a new bug report

nuxt-i18n • 9 hours ago

bug nuxt-i18n <-> vuelidate dynamic validation issue

Version

5.4.3

Reproduction link

https://codesandbox.io/s/vy54y194yy

Steps to reproduce

Apparently there seems to be an issue that the dynamic validations are no longer triggered, when "nuxt-i18n" is used.

I reproduced the issue here:
[broken]
https://codesandbox.io/s/vy54y194yy

[working]
https://codesandbox.io/s/ywxknqooxv

The example is the one used in the vuelidate documentation: https://monterail.github.io/vuelidate/#sub-dynamic-validation-schema

The only difference between the working and broken example is that in the working one the module for nuxt-i18n is commented out in the nuxt config.

What is expected ?

The expected behavior is that the validation configuration should change when the checkbox is clicked.

What is actually happening?

Validation configuration does not change.

Additional comments?

Since I'm not really sure who can fix this issue I created this issue for nuxt-i18n and vuelidate.

Thanks in advance :)

antony

antony posted a new question

docs • 10 hours ago

Where are older docs?

I've just visited the Nuxt site to find that the docs are now for version 2.x - last time i checked they were 1.x!

We've not quite moved to v2.x yet, so how can I get docs for my existing application?

rchl

rchl posted a new bug report

nuxt-i18n • 11 hours ago

bug Duplicate route names with prefix_and_default strategy

Version

v5.3.0

Reproduction link

https://codesandbox.io/s/ql7wx2mvk6

Steps to reproduce

  1. Configure nuxt-i18n module with these settings:
    [
      "nuxt-i18n",
      {
        locales: [
          { code: "pt", iso: "pt-PT", file: "pt.json" },
          { code: "us", iso: "en-US", file: "en.json" }
        ],
        langDir: "locales/",
        lazy: true,
        strategy: "prefix_and_default",
        defaultLocale: "us"
      }
    ]
  1. Load the root path.
  2. Look at the console (the server one, at the bottom of the codesandbox UI)

What is expected ?

No warnings about duplicated routes.

What is actually happening?

Getting console warnings:

[vue-router] Duplicate named routes definition: { name: "about___us", path: "/us/about" } 
[vue-router] Duplicate named routes definition: { name: "index___us", path: "/us" }

Additional comments?

Appears to be due to using strategy: "prefix_and_default", setting which creates routes with duplicate names for default locale.

hemulin

hemulin posted a new question

pwa-module • 15 hours ago

Can't remove pwa

This is really weird.

Couple of weeks ago I've added the PWA module to one of my projects.
Ever since then, EVERY project that uses nuxt is trying to call sw.js which clearly doesn't exists.

I thought it is something with caching on the browser and I've cleared it all but still every few seconds I see the following:

  nuxt:render Rendering url /sw.js +19s
{ statusCode: 404,
  path: '/sw.js',
  message: 'This page could not be found' }

How can I avoid this devilish behavior of the PWA?

KonstantinPatlasov

KonstantinPatlasov posted a new question

nuxt.js • 16 hours ago

nuxt.js/examples/vue-apollo ReferenceError: window is not defined

When starting a project examples/vue-apollo I get the following error ReferenceError: window is not defined.
× error ReferenceError: window is not defined
at module.exports../.nuxt/apollo.plugin.bf6fe514.js.webpack_exports.default.ctx (server-bundle.js:278:19)
at createApp (server-bundle.js:841:209)
at

KonstantinPatlasov

KonstantinPatlasov posted a new question

nuxt.js • 16 hours ago

nuxt.js/examples/vue-apollo ReferenceError: window is not defined

When starting a project examples/vue-apollo I get the following error ReferenceError: window is not defined.
× error ReferenceError: window is not defined
at module.exports../.nuxt/apollo.plugin.bf6fe514.js.webpack_exports.default.ctx (server-bundle.js:278:19)
at createApp (server-bundle.js:841:209)
at <anonymous>

How to solve this problem?

derevandal

derevandal posted a new question

nuxt.js • a day ago

How can I add Critters after HtmlWebpackPlugin?

Hi, I'm trying add Critters in my nuxt.config.js but, because of some bug, I need insert after HtmlWebpackPlugin.

I tried and failed with this:

build: {
...
   extend(config, ctx) {
      const HtmlWebpackPlugin = config.plugins.find(plugin => {
        return plugin.constructor.name === 'HtmlWebpackPlugin'
      })
      const HtmlWebpackPluginIndex =
        config.plugins.indexOf(HtmlWebpackPlugin) + 1

      config.plugins.splice(
        HtmlWebpackPluginIndex,
        0,
        new Critters({
          preload: 'swap',
          preloadFonts: true,
          noscriptFallback: true
        })
      )
   }

   ..
}

Could anyone help me?

Thanks

simllll

simllll posted a new question

sentry-module • a day ago

Webpack Sentry plugin for sourcemaps

See https://github.com/40thieves/webpack-sentry-plugin

Would be great if this module does this also.

WildSunLove

WildSunLove posted a new question

auth-module • a day ago

Integrating with Express API

I have an application, integrating Nuxt with Express, to have an API backend integrated into the application.
I'm trying to understand how to connect the authentication flow of the backend and the frontend.
Specifically, how to use Google OAuth, and have the front end and the back end both be aware of the authenticated user.

stewie0013

stewie0013 posted a new question

auth-module • a day ago

Able to access /secure route without actually logging in

With Nuxt being an SSR framework, all pages are given to the client upon first load, even the content of the /secure page. I am able to easily view this page by typing window.__NUXT__.state.auth.loggedIn = true

Is there a workaround for this, so that I can have protected routes on the server without giving the content of them to the client on the first load?

Mikkou

Mikkou posted a new question

nuxt.js • a day ago

TS2314: Generic type 'ComponentOptions<V>' requires 1 type argument(s).

My vue component

<template>
  <div>stocks3</div>
</template>

<script lang="ts">
  import {Component, Vue} from 'nuxt-property-decorator'
  import {ComponentOptions} from 'vue/types/options'

  @Component
  export default class extends Vue implements ComponentOptions {

    name: 'Index'
    head: {
      meta: [
        {charset: 'utf-84'},
        {name: 'viewport', content: 'width=device-width, initial-scale=1'}
        ],
      title: 'Акции'
    }

    constructor() {
      super()
    }

  }

</script>

index.d.ts

declare module '*.vue' {
  import Vue from 'vue'
  const _default: Vue
  export default _default
}

declare module 'vue/types/options' {
  import {Vue} from 'nuxt-property-decorator'
  interface ComponentOptions<V extends Vue> {
    name: string;
    layout: string;
    head: Object;
  }
}

What i do wrong?

begueradj

begueradj posted a new feature request

hare • a day ago

idea Integrate Jest for testing

What problem does this feature solve?

Suggest Integrates unit testing through Jest during the scaffolding process.
This template ignores totally software testing concepts as it does not suggest any tool to run unit tests, for example.

What does the proposed changes look like?

During the scaffolding process, Jest should be selectable to run unit tests.

begueradj

begueradj resolved the question #c7982

nuxt.js • a day ago

Are SPA and dynamic nested routes 2 mutually exclusive concepts?

I did tests and found out I can combine SPA and dynamic nested routes.
Thank you
Billal Begueradj

awronski

awronski posted a new bug report

nuxt.js • a day ago

bug Page dom refreshed Before transition

Version

v2.2.0

Reproduction link

https://codesandbox.io/s/2j0y809j2p

Steps to reproduce

I am not sure if it is a bug or just my mistake. The reproduction simulate chaining a state with fetch, like in a app with axios.

  1. Run the example
  2. Click Start <- transition is ok
  3. Click Next 1 <- starts blinking
    etc

You will see a color blink. Because the store/page is refreshed before the transition starts.
So first the color is changing to new value, then the transition is starting.

Check the console output.

What is expected ?

afterLeave…
Before enter…
store.mutations #a40c82
---mounted
After enter…

What is actually happening?

store.mutations #a40c82
afterLeave…
Before enter…
---mounted
After enter…

Additional comments?

Thanks for help!

manniL

manniL posted a new feature request

nuxt.js • a day ago

idea Switch to ExtractCssChunksPlugin

What problem does this feature solve?

Just a suggestion / maybe worth looking at: https://github.com/faceyspacey/extract-css-chunks-webpack-plugin

After several issues with mini-css-extract-plugin we could maybe provide an option to switch to the plugin (if it's worth)

Key improvements:

  • HMR!
  • DropIn replacement
archieDeveloper

archieDeveloper posted a new question

nuxt.js • 2 days ago

Disable progress bar events on page

I want to disable $loading.finish (start, set or others) events on the page and call them manually in the fetch or asyncData method.

If I use 3 await axios requests in asyncData, then the progress bar twitches 3 times - it doesn't suit me.

I want to have one progress bar lasting from the start of the download to the last await axios request.

How can I achieve this?