Skip to content

Nuxt 4 RollupError #390

@amonys19212

Description

@amonys19212

In the current Nuxt 4 version (Nuxt nightly channel: 4.0.0-29092227.317ced76), the installed Nuxt Icon(v1.12.0) fails to start the Nuxt server properly.

Nitro Error

RollupError: node_modules/@nuxt/icon/dist/runtime/server/api.js (6:9): "useAppConfig" is not exported by "virtual:#imports", imported by "node_modules/@nuxt/icon/dist/runtime/server/api.js".


4: import { createError, getQuery } from "h3";
5: import { consola } from "consola";
6: import { useAppConfig, getRequestURL, defineCachedEventHandler } from "#imports";
            ^
7: import { collections } from "#nuxt-icon-server-bundle";
8: const warnOnceSet = /* @__PURE__ */ new Set();

nuxt.config.ts

export default defineNuxtConfig({
  compatibilityDate: '2024-04-03',
  devtools: { enabled: false },

  modules: ['@nuxt/icon']
})

package.json

{
  "dependencies": {
    "@nuxt/icon": "^1.12.0",
    "nuxt": "npm:nuxt-nightly@latest"
  }
}

Example
https://stackblitz.com/edit/nuxt-starter-ursfb2qu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions