Giter Site home page Giter Site logo

Comments (5)

gilmoreorless avatar gilmoreorless commented on June 19, 2024

Usually situations like this are caused by accidentally having 2 different copies of moment somewhere in the dependency tree. See the "npm" and/or "yarn" sections at #982 (comment) for tips to verify if that's the problem (and how to fix it).

from moment-timezone.

rendomnet avatar rendomnet commented on June 19, 2024

@gilmoreorless
I have only this

    "moment": "^2.29.4",
    "moment-timezone": "^0.5.43",

from moment-timezone.

gilmoreorless avatar gilmoreorless commented on June 19, 2024

What's specified in package.json is only part of the story. As #982 (comment) explains, what matters is how the dependencies are actually installed in node_modules. moment-timezone could be depending on a version of moment that's different from the one you've specified.

This is something I'm hoping to solve by moving moment to be a peer dependency of moment-timezone (#1039 (comment)).

from moment-timezone.

rendomnet avatar rendomnet commented on June 19, 2024

I've completely removed the 'node_modules' directory and reinstalled it, but the issue still persists. Do I need to have "moment" for 'moment-timezone' to have the necessary locale files? Are they compatible?

from moment-timezone.

gilmoreorless avatar gilmoreorless commented on June 19, 2024

If there's a lockfile like package-lock.json or yarn.lock that's storing the duplicate versions, removing node_modules won't fix the problem. I've already linked to better explanations of how to diagnose and fix this.

from moment-timezone.

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.