Comments (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.
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.
I also wait for official module support! 🙏🏻
from dayjs-module.
Also seeing that this wont work in nuxt3
from dayjs-module.
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.
any news?
from dayjs-module.
Any?
from dayjs-module.
Going to track Nuxt 3 support in this issue #451
from dayjs-module.
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)
- Jest testing: TypeError: $dayjs is not a function HOT 4
- update dayjs to latest version (1.10.4) HOT 2
- Set defaultTimeZone from store? HOT 3
- Locales and defaultLocale HOT 1
- Vite support
- Dependency Dashboard
- Question: How to use updateLocale in nuxtjs/dayjs? HOT 2
- Nuxt warning occurs when this module is used HOT 1
- TS2345: Argument of type 'string' is not assignable to parameter of type HOT 3
- Plugin list without extension not working anymore
- Nuxt3 Support HOT 15
- [Nuxt Bridge] Build tries to import plugin without file format HOT 1
- Discussion for @nuxtjs/dayjs version 2 HOT 2
- dayjs reverts to defaultLocale when rendered server side HOT 1
- Parse from specific locale ?
- Registering a local plugin
- Day JS in Nuxt guessing timezone using tz.guess() not a function
- Nuxt 3 Support HOT 1
- Error on creating a new locale, for Latin language.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dayjs-module.