Skip to content

[BUG] ERROR "does not provide an export named 'en'" when use date-fns as Adapter #318

@trydofor

Description

@trydofor

fail to start nuxt if set date.adapter to 'date-fns'

__x00__virtual:vuetify-date-configuration:2 
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.cache/vite/client/deps/date-fns_locale.js?v=2035bc05' 
does not provide an export named 'en' 
(at __x00__virtual:vuetify-date-configuration:2:10)

__x00__virtual:vuetify-date-configuration

import Adapter from "/_nuxt/node_modules/.cache/vite/client/deps/@date-io_date-fns.js?v=2035bc05"
import { en } from "/_nuxt/node_modules/.cache/vite/client/deps/date-fns_locale.js?v=2035bc05"
export const enabled = true
export const isDev = true
export const i18n = true
export const adapter = 'date-fns'
export function dateConfiguration() {
  const options = JSON.parse('{}')
  options.adapter = new Adapter({ locale: en })
  return options
}

because "[email protected]" export enUS, not en any more

use vuetify as workground.

https://github.com/vuetifyjs/nuxt-module/blob/f299477f9abf7f811c3887e06e26a087122d95c3/src/vite/vuetify-date-configuration-plugin.ts#L51C4-L51C61

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