Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    After upgrade: Clock module getting error: "Can't find variable: moment"

    Troubleshooting
    2
    3
    2230
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tkotz8621 last edited by

      I initially updated MagicMirror2 to V2.1.1 through git pull but then started getting blank screen running serveronly and so I reinstalled entire MagicMirror2 and modules. Started serveronly again and getting blank screen again. When I look in system log file, I’m getting the error:
      Message: console message: http://localhost:8080/modules/default/clock//clock.js @49: ReferenceError: Can’t find variable: moment
      Message: console message: http://localhost:8080/modules/default/clock//clock.js @77: ReferenceError: Can’t find variable: moment
      Did I miss installing a dependency?
      I’m running MagicMirror on Pi Zero, Raspian Jessie

      strawberry 3.141 1 Reply Last reply Reply Quote 0
      • strawberry 3.141
        strawberry 3.141 Project Sponsor Module Developer @tkotz8621 last edited by

        @tkotz8621 you have to run npm install in the MagicMirror directory, which will itself call npm install in the vendor directory for moment.js

        1 Reply Last reply Reply Quote 0
        • T
          tkotz8621 last edited by

          Thanks for the quick response strawberry 3.141. I thought I ran ‘npm install’ but I ran it as you suggested and now clock is working. Thanks again.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy