Skip to content

Missing "./runtime" specifier in "@nuxt/image" package #1970

@X-Cotang

Description

@X-Cotang

When attempting to create a custom image provider with @nuxt/image in a Nuxt 4 project, an import error occurs while trying to import createOperationsGenerator and defineProvider from @nuxt/image/runtime. The error is as follows:

[plugin:vite:import-analysis] Missing "./runtime" specifier in "@nuxt/image" package
D:/Project/my-frontend/providers/my-provider.ts:2:58
1  |  import { joinURL } from "ufo";
2  |  import { createOperationsGenerator, defineProvider } from "@nuxt/image/runtime";
   |                                                             ^
3  |  
4  |  import { useRuntimeConfig } from '#app/nuxt';

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