Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

116
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda