Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: can't access property "format", e4.duration is undefined #220

Closed
parth391 opened this issue Nov 22, 2022 · 4 comments
Closed

Comments

@parth391
Copy link

Version
react-live-clock: 6.1.0

Screenshot 2022-11-22 at 8 57 00 PM

@anthony0030
Copy link
Collaborator

I will need a bit more information like the environment that you are using it in.
Also a minimum reproduction of the error like in a code pen.
Do you have the same error on version 6.0.8?
Please also dry delete your node_modules folder and reinstall them.
Please get back to me whether the proposed solutions worked or not.

@anthony0030
Copy link
Collaborator

Closing due to inactivity.

@xzessmedia
Copy link

I ran into the same error, in my case i'm using vite, so the error is vite related and not by this component..
according to this issue
vitejs/vite#6675

the solution is with this answer
vitejs/vite#6675 (comment)

install this package
npm i @originjs/vite-plugin-commonjs

do the following change:

vite.config.ts or vite.config.js

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { viteCommonjs, esbuildCommonjs } from '@originjs/vite-plugin-commonjs';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  optimizeDeps: {
    esbuildOptions: {
      plugins: [esbuildCommonjs(['react-moment'])],
    },
  },
});

@anthony0030
Copy link
Collaborator

Hi @xzessmedia, thank you for providing a solution. I have no experience with Vite so I cant verify it.
Thanks again for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants