Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Nuxt v3.15.0 (specifically @nuxt/kit v3.15.0) (Error: Could not load nuxt-booster) #1177

Closed
codeflorist opened this issue Dec 27, 2024 · 9 comments

Comments

@codeflorist
Copy link

Describe the bug
After upgrading to Nuxt v3.15.0 the following error is thrown:

 ERROR  Could not load nuxt-booster. Is it installed?

    at loadNuxtModuleInstance (node_modules/@nuxt/kit/dist/index.mjs:2560:11)
    at async Module.installModule (node_modules/@nuxt/kit/dist/index.mjs:2478:67)
    at async initNuxt (node_modules/nuxt/dist/index.mjs:5292:5)
    at async loadNuxt (node_modules/nuxt/dist/index.mjs:5476:5)
    at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:2730:19)
    at async Object.run (node_modules/nuxi/dist/chunks/prepare.mjs:75:18)
    at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.DSPrE7vg.mjs:1798:16)
    at async runCommand$1 (node_modules/nuxi/dist/shared/nuxi.DSPrE7vg.mjs:1789:11)
    at async runMain$1 (node_modules/nuxi/dist/shared/nuxi.DSPrE7vg.mjs:1927:7) 

When downgrading to @nuxt/kit v3.14.1592 it works again. It can be tested by putting this in package.json:

  "peerDependencies": {
    "@nuxt/kit": "3.14.1592"
  }

To Reproduce
Steps to reproduce the behavior:

  1. Simply add nuxt-booster to a Nuxt v3.15.0 installation

A reproduction is available here:
https://stackblitz.com/edit/nuxt-starter-mhluuehm?file=package.json

@StirStudios
Copy link

Same issue for us as well.

@ThornWalli
Copy link
Contributor

Hello @codeflorist @StirStudios,

Took out Javascript imports in the build and came to the conclusion that the import of hash-sum in jitti causes problems...

Removed the lib, can be tested soon on nuxt-booster@next.

When published 😉

@ThornWalli ThornWalli mentioned this issue Dec 28, 2024
@StirStudios
Copy link

StirStudios commented Dec 28, 2024

Thanks so much for the update but now we are getting this

0|WebSite  |  ERROR  [GET] https://WebSite.ddev.site/front - Error: Unexpected token ';'
0|WebSite  | [GET] https://WebSite.ddev.site/__nuxt_error?url=%2Ffront&statusCode=500&statusMessage&message=internal+server+error&stack=%3Cpre%3E%3C%2Fpre%3E
0|WebSite  |  ERROR  [nuxt] [request error] [unhandled] [500] Unexpected token ';'
0|WebSite  |  ERROR  [GET] https://WebSite.ddev.site/__nuxt_error?url=%2Ffront&statusCode=500&statusMessage&message=internal+server+error&stack=%3Cpre%3E%3C%2Fpre%3E - Error: Unexpected token ';'
0|WebSite  |  ERROR  [nuxt] [request error] [unhandled] [500] Unexpected token ';'
"dependencies": {
  "nuxt": "^3.15.0",
  "nuxt-booster": "3.1.9-next.2",
},

If we downgrade to this:

"dependencies": {
  "nuxt": "3.14.1592",
  "nuxt-booster": "3.1.9-next.2",
},

It works again.

@ThornWalli
Copy link
Contributor

@StirStudios You can test the version: 3.1.9-next.3

In Stackblitz it runs with the 2. https://stackblitz.com/edit/nuxt-starter-mdjinoaz?file=package.json
I have a hunch and removed something again.

@StirStudios
Copy link

Hey @ThornWalli thanks for the quick update. Unfortunately it is the same on my end.

To avoid issues I also ran:
rm -rf node_modules pnpm-lock.yaml
pnpm store prune
pnpm i

Config has not changed either:

[
      'nuxt-booster',
      {
        disableNuxtFontaine: true,
        disableNuxtImage: true,

        detection: {
          performance: true,
          browserSupport: true,
        },

        performanceMetrics: {
          device: {
            hardwareConcurrency: { min: 2, max: 48 },
            deviceMemory: { min: 2 },
          },
          timing: {
            fcp: 800,
            dcl: 1200,
          },
        },

        fonts: [
          {
            family: 'Poppins',
            locals: ['Poppins'],
            fallback: ['Helvetica', 'Arial', 'sans-serif'],
            variances: [
              {
                style: 'normal',
                weight: 300,
                sources: [
                  {
                    src: '@/assets/fonts/poppins-v21-latin-300.woff2',
                    type: 'woff2',
                  },
                  {
                    src: '@/assets/fonts/poppins-v21-latin-300.woff',
                    type: 'woff',
                  },
                ],
              },
              {
                style: 'normal',
                weight: 400,
                sources: [
                  {
                    src: '@/assets/fonts/poppins-v21-latin-regular.woff2',
                    type: 'woff2',
                  },
                  {
                    src: '@/assets/fonts/poppins-v21-latin-regular.woff',
                    type: 'woff',
                  },
                ],
              },
              {
                style: 'italic',
                weight: 400,
                sources: [
                  {
                    src: '@/assets/fonts/poppins-v21-latin-italic.woff2',
                    type: 'woff2',
                  },
                  {
                    src: '@/assets/fonts/poppins-v21-latin-italic.woff',
                    type: 'woff',
                  },
                ],
              },
              {
                style: 'normal',
                weight: 600,
                sources: [
                  {
                    src: '@/assets/fonts/poppins-v21-latin-600.woff2',
                    type: 'woff2',
                  },
                  {
                    src: '@/assets/fonts/poppins-v21-latin-600.woff',
                    type: 'woff',
                  },
                ],
              },
            ],
          },
          {
            family: 'Vollkorn',
            locals: ['Vollkorn'],
            fallback: ['Georgia', 'Times New Roman', 'serif'],
            variances: [
              {
                style: 'normal',
                weight: 400,
                sources: [
                  {
                    src: '@/assets/fonts/vollkorn-v23-latin-regular.woff2',
                    type: 'woff2',
                  },
                  {
                    src: '@/assets/fonts/vollkorn-v23-latin-regular.woff',
                    type: 'woff',
                  },
                ],
              },
              {
                style: 'normal',
                weight: 500,
                sources: [
                  {
                    src: '@/assets/fonts/vollkorn-v23-latin-500.woff2',
                    type: 'woff2',
                  },
                  {
                    src: '@/assets/fonts/vollkorn-v23-latin-500.woff',
                    type: 'woff',
                  },
                ],
              },
            ],
          },
        ],

        componentAutoImport: false,
        componentPrefix: undefined,

        lazyOffset: {
          component: '0%',
          asset: '0%',
        },
      },
    ],

Confirmed with your Stackblitz it is working with the previous version.

@StirStudios
Copy link

Okay it seems my issue is related to this @ThornWalli

nuxt/ui#2971

Sorry to confuse things.

@ThornWalli
Copy link
Contributor

ThornWalli commented Dec 29, 2024

@StirStudios No problem 🙃

This happens from time to time...

@ThornWalli
Copy link
Contributor

According to nuxt/ui#2971, the problem should now be solved.

@StirStudios
Copy link

Confirmed, No more issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants