Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!