Giter Club home page Giter Club logo

Comments (9)

andorfermichael avatar andorfermichael commented on May 30, 2024 9

@danielroe still not working in the next version of nuxt which is v3.0.0

I also cannot apply the workaround because I already have values in runtimeConfig public.

I am currently using https://github.com/nathanchase/dayjs/ as a workaround but I would be happier with using the official community package.

from dayjs-module.

danielroe avatar danielroe commented on May 30, 2024

This should be resolved in the next Nuxt release and is not an issue with this module.

If you need a workaround before the next version of nuxt is released, you can add the following to your nuxt config:

runtimeConfig: { public: {} },

from dayjs-module.

yeonjulee1005 avatar yeonjulee1005 commented on May 30, 2024

I also wait for official module support! 🙏🏻

from dayjs-module.

timothymarois avatar timothymarois commented on May 30, 2024

Also seeing that this wont work in nuxt3

from dayjs-module.

Dinuz avatar Dinuz commented on May 30, 2024

Yeah still same error and workaround doesn't really work with nuxt 3.2.2 same exact error of @andorfermichael . @danielroe we got up in version but nothing still solved, what do you think the issue is?
Only difference that I can notice from this plugin and the nathanchase version (that works) is:

this plugin:

import dayjs from 'dayjs'

declare module '#app' {
  interface NuxtApp {
    $dayjs: dayjs.Dayjs
 }
}

nathanchase plugin:

import dayjs from 'dayjs/esm/index.js'

declare module '@vue/runtime-core' {
  interface ComponentCustomProperties {
    $dayjs(date?: dayjs.ConfigType): dayjs.Dayjs
  }
}

If the issue is the import, this would make sense cause there are few complain about that, so in that case the issue is in dayjs. If instead the problem is the second instruction, then the issue is the way in which we build the plugin in nuxt3, and the buck stops here.

from dayjs-module.

joseehilton147 avatar joseehilton147 commented on May 30, 2024

any news?

from dayjs-module.

davvvvsss avatar davvvvsss commented on May 30, 2024

Any?

from dayjs-module.

harlan-zw avatar harlan-zw commented on May 30, 2024

Going to track Nuxt 3 support in this issue #451

from dayjs-module.

amakavanessa avatar amakavanessa commented on May 30, 2024

Ran into the same error a while ago and solved it by using Day.js. I was able to access Day.js like this:

const dayjs = useDayjs();
const today = dayjs();

from dayjs-module.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.