Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

117
Vistas
NuxtJS not registering/using custom module

So I am trying to build my custom NuxtJS module. So far I've read the docs, looked at some existing real packages, and followed these:

  • https://nuxtjs.org/docs/directory-structure/modules/#write-your-own-module
  • https://nuxtjs.org/tutorials/creating-a-nuxt-module

This is my simple code located in modules/pauth/index.js

export default function () {
  // const { nuxt } = this
  console.log('robert modules')

}

I have tried different variations I could find online but nothing seems to be working. The project compiles fine, and there is no errors.

If I make a typo in the name of module in nuxt.config.js it will give me an error, which means it is actually seeing my module.

This is my config file (part of it):

  // Modules (https://go.nuxtjs.dev/config-modules)
  modules: [
    '@nuxtjs/laravel-echo',
    '@nuxtjs/axios',
    'vue-social-sharing/nuxt',
    '@nuxt/image',
    'vue-scrollto/nuxt',
    '@nuxtjs/moment',
    '~/modules/pauth',
  ],

I am expecting to see my console.log but nothing seems to happen. It's like it's ignored or something. I also tried to inspect the NuxtJS instance in the browser but I did not see my module there.

I am also constantly rebuilding with npm run dev.

What am I doing wrong?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda