nuxt-booster: Cannot import any of the booster components

Describe the bug I’m unable to import any of the booster components, as the import throws a TS2307 error: Cannot find module '#booster/components/BoosterPicture' or its corresponding type declarations.ts(2307).

To Reproduce Steps to reproduce the behavior:

  1. Import a booster component
  2. View the error on eslint or IDE

Expected behavior Component should import properly

Screenshots image image

Desktop (please complete the following information):

  • OS: MacOS Sonoma 14.6.1
  • Browser: Chrome
  • Version

Smartphone (please complete the following information): not tested yet

Additional context I have already installed and added the nuxt-booster module, here are some of my configurations:

"nuxt": "^3.12.4",
"nuxt-booster": "^3.1.5",
"vue": "^3.4.21",

My nuxt-booster config, a simplified version of the template from the docs:

booster: {
    performanceMetrics: {
      device: {
        hardwareConcurrency: { min: 2, max: 48 },
        deviceMemory: { min: 2 },
      },
      timing: {
        fcp: 800,
        dcl: 1200, // fallback if fcp is not available (safari)
      },
    },

    componentAutoImport: false,
    componentPrefix: undefined,

    /**
     * IntersectionObserver rootMargin for Components and Assets
     */
    lazyOffset: {
      component: '0%',
      asset: '0%',
    },
  },

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

@ThornWalli working on a company project right now so I might not be able to create an exact reproduction, but I’ll see if i can recreate in another repo