formkit / tempo

📆 Parse, format, manipulate, and internationalize dates and times in JavaScript and TypeScript.
https://tempo.formkit.com
MIT License
2.37k stars 33 forks source link

"diffMinutes does not exist" error #65

Closed luluconcha closed 3 months ago

luluconcha commented 4 months ago

Hi! I am trying to use the diffMinutes helper and get the following error: "The requested module '/node_modules/.vite/deps/@formkit_tempo.js?v=4f88df81' does not provide an export named 'diffMinutes' "

The import looks like this: import { addMinute, diffMinutes } from '@formkit/tempo'

Been using @formkit with Vue 3, composition API for a while on this project and it's the first time I've had the issue (just the addMinutedoesn't break it)

thank you!

justin-schroeder commented 3 months ago

Are you sure you are using >= 0.1? diffMinutes was introduced then.

luluconcha commented 3 months ago

Right, it seems I am using "@formkit/tempo": "^0.0.19"... but I ran npm install @formkit/tempo again just now, closed and reopened the editor, and still this version. Any idea how to update to a newer version?

justin-schroeder commented 3 months ago

you can do something like npm install @formkit/tempo@latest