• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-Canvas and MMM-Stocks not working

Scheduled Pinned Locked Moved Solved Troubleshooting
13 Posts 2 Posters 2.8k Views 2 Watching
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.
  • G Offline
    Gabe21
    last edited by Oct 31, 2021, 4:32 PM

    Hi! I’m new to the raspberry pi. I’m using the MMM-Pages to have 2 pages that the mirror cycles through. I installed the MMM-Canvas and MMM-Stocks to add to the second page. When I try to launch the mirror it shows a black screen and on the tab it shows “Electron”. When I comment out both the Canvas and Stocks module it works fine. What am I doing wrong?

    Thank you in advance!

    S 1 Reply Last reply Oct 31, 2021, 4:56 PM Reply Quote 0
    • S Offline
      sdetweil @Gabe21
      last edited by Oct 31, 2021, 4:56 PM

      @gabe21 https://forum.magicmirror.builders/topic/15778/fix-for-black-screen-in-2-16-and-later

      probably

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      G 1 Reply Last reply Oct 31, 2021, 6:11 PM Reply Quote 0
      • G Offline
        Gabe21 @sdetweil
        last edited by Oct 31, 2021, 6:11 PM

        @sdetweil I’m doing it and I get this:

        pi@raspberrypi:~ $ npm init -y
        Wrote to /home/pi/package.json:
        
        {
          "name": "pi",
          "version": "1.0.0",
          "description": "",
          "main": "index.js",
          "scripts": {
            "test": "echo \"Error: no test specified\" && exit 1"
          },
          "keywords": [],
          "author": "",
          "license": "ISC"
        }
        
        
        pi@raspberrypi:~ $ npm install MMM-Canvas
        npm ERR! code E404
        npm ERR! 404 Not Found - GET https://registry.npmjs.org/MMM-Canvas - Not found
        npm ERR! 404 
        npm ERR! 404  'MMM-Canvas@latest' is not in the npm registry.
        npm ERR! 404 Your package name is not valid, because 
        npm ERR! 404  1. name can no longer contain capital letters
        npm ERR! 404 
        npm ERR! 404 Note that you can also install from a
        npm ERR! 404 tarball, folder, http url, or git url.
        
        npm ERR! A complete log of this run can be found in:
        npm ERR!     /home/pi/.npm/_logs/2021-10-31T18_07_21_746Z-debug.log
        
        
        S G 2 Replies Last reply Oct 31, 2021, 6:13 PM Reply Quote 0
        • S Offline
          sdetweil @Gabe21
          last edited by sdetweil Oct 31, 2021, 6:14 PM Oct 31, 2021, 6:13 PM

          @gabe21 in the module folder that is causing the problem

          cd MagicMirror/modules/MMM-Canvas
          THEN the commands

          from the text of the post

          to fix this you need to install the library in the module folder
          

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • G Offline
            Gabe21 @Gabe21
            last edited by Oct 31, 2021, 6:20 PM

            @gabe21 I tried that it is says

            pi@raspberrypi:~/MagicMirror/modules/MMM-Canvas $ npm init -y
            Wrote to /home/pi/MagicMirror/modules/MMM-Canvas/package.json:
            
            {
              "name": "MMM-Canvas",
              "version": "1.0.0",
              "description": "This is a module for `MagicMirror²` which displays upcoming assignments from the Canvas LMS. The Canvas LMS is used by colleges, universities and other institutions for coursework.",
              "main": "MMM-Canvas.js",
              "scripts": {
                "test": "echo \"Error: no test specified\" && exit 1"
              },
              "repository": {
                "type": "git",
                "url": "git+https://github.com/chase-cromwell/MMM-Canvas.git"
              },
              "keywords": [],
              "author": "",
              "license": "ISC",
              "bugs": {
                "url": "https://github.com/chase-cromwell/MMM-Canvas/issues"
              },
              "homepage": "https://github.com/chase-cromwell/MMM-Canvas#readme"
            }
            
            
            pi@raspberrypi:~/MagicMirror/modules/MMM-Canvas $ npm install MMM-Canvas
            npm ERR! code E404
            npm ERR! 404 Not Found - GET https://registry.npmjs.org/MMM-Canvas - Not found
            npm ERR! 404 
            npm ERR! 404  'MMM-Canvas@latest' is not in the npm registry.
            npm ERR! 404 Your package name is not valid, because 
            npm ERR! 404  1. name can no longer contain capital letters
            npm ERR! 404 
            npm ERR! 404 Note that you can also install from a
            npm ERR! 404 tarball, folder, http url, or git url.
            
            npm ERR! A complete log of this run can be found in:
            npm ERR!     /home/pi/.npm/_logs/2021-10-31T18_19_03_220Z-debug.log
            pi@raspberrypi:~/MagicMirror/modules/MMM-Canvas $ 
            
            
            S 1 Reply Last reply Oct 31, 2021, 6:21 PM Reply Quote 0
            • S Offline
              sdetweil @Gabe21
              last edited by Oct 31, 2021, 6:21 PM

              @gabe21 after you do the npm init

              then u need to add the missing library

              request
              valid-url
              or whatever

              npm install XXX

              where XXX is one of the above, as needed by the messages shown in the MM startup messages

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              G 1 Reply Last reply Oct 31, 2021, 7:07 PM Reply Quote 0
              • G Offline
                Gabe21 @sdetweil
                last edited by Oct 31, 2021, 7:07 PM

                @sdetweil Sorry I’m pretty new to the raspberry-where would I get the missing library from?

                1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil
                  last edited by Oct 31, 2021, 7:10 PM

                  @gabe21 said in MMM-Canvas and MMM-Stocks not working:

                  where would I get the missing library from?

                  the messages output by MM starting up

                  you either did

                  npm start
                  and it spews out messages

                  or you used pm2
                  and it captures the messages
                  pm2 logs --lines=??? (default 15) will show the messages

                  you are looking for

                  cannot find module xxx

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  G 1 Reply Last reply Oct 31, 2021, 7:22 PM Reply Quote 0
                  • G Offline
                    Gabe21 @sdetweil
                    last edited by Oct 31, 2021, 7:22 PM

                    @sdetweil

                    code: 'MODULE_NOT_FOUND',
                      requireStack: [
                        '/home/pi/MagicMirror/modules/MMM-Canvas/node_helper.js',
                        '/home/pi/MagicMirror/js/app.js',
                        '/home/pi/MagicMirror/js/electron.js',
                        '/code: 'MODULE_NOT_FOUND',
                          requireStack: [
                            '/home/pi/MagicMirror/modules/MMM-Canvas/node_helper.js',
                            '/home/pi/MagicMirror/js/app.js',
                            '/home/pi/MagicMirror/js/electron.js',
                            '/home/pi/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js',
                      
                    
                    

                    So

                    npm install /home/pi/MagicMirror/modules/MMM-Canvas/node_helper.js

                    ?

                    S 1 Reply Last reply Oct 31, 2021, 7:23 PM Reply Quote 0
                    • S Offline
                      sdetweil @Gabe21
                      last edited by Oct 31, 2021, 7:23 PM

                      @gabe21 no… up further in the messages

                      before

                      code: 'MODULE_NOT_FOUND',
                        requireStack: [
                      

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      G 1 Reply Last reply Oct 31, 2021, 7:27 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        4/13
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy