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-avstock error

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    2 Posts 2 Posters 493 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.
    • T Offline
      Thona
      last edited by

      Hi.
      Im totally new to this so bear with me.
      Working on a MagicMirror and tryed to install avstock, but getting errors all the way.
      Any1 see what is wrong here?

      ],
      showSourceTitle: true,
      showPublishDate: true,
      broadcastNewsFeeds: true,
      broadcastNewsUpdates: true
      }
      },
      {
      module: “MMM-AVStock”,
      position: “top_bar”, //“bottom_bar” is better for mode:ticker
      config: {
      apiKey : “xxxxxxxxxxxxxxxx”,
      timeFormat: “DD-MM HH:mm”,
      width: null,
      symbols : [“mpcc”, “GOOGL”, “TSLA”],
      alias: [“MPCC”, “GOOGLE”, “TESLA”],
      locale: config.english,
      tickerDuration: 20,
      chartDays: 90,
      maxTableRows: null,
      mode : “table”, // “table” or “ticker”
      showChart: true,
      pureLine: false,
      chartWidth: null,
      showVolume: true,
      chartInterval: “daily”, // choose from [“intraday”, “daily”, “weekly”, “monthly”]
      movingAverage: {
      type: ‘SMA’,
      periods: [200]
      },
      decimals : 2,
      chartType: ‘candlestick’, // ‘line’, ‘candlestick’, or ‘ohlc’
      chartLineColor: ‘#eee’,
      chartLabelColor: ‘#eee’,
      coloredCandles: true,
      debug: false
      }
      },
      ]
      };

      pi@raspberrypi:~/MagicMirror $ npm run start

      magicmirror@2.18.0 start
      DISPLAY=“${DISPLAY:=:0}” ./node_modules/.bin/electron js/electron.js

      [15.03.2022 19:58.23.429] [LOG] Starting MagicMirror: v2.18.0
      [15.03.2022 19:58.23.439] [LOG] Loading config …
      [15.03.2022 19:58.23.446] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: ReferenceError: Cannot access ‘config’ before initialization
      at Object. (/home/pi/MagicMirror/config/config.js:134:17)
      at Module._compile (node:internal/modules/cjs/loader:1116:14)
      at Object.Module._extensions…js (node:internal/modules/cjs/loader:1169:10)
      at Module.load (node:internal/modules/cjs/loader:988:32)
      at Module._load (node:internal/modules/cjs/loader:829:12)
      at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
      at Module.require (node:internal/modules/cjs/loader:1012:19)
      at require (node:internal/modules/cjs/helpers:94:18)
      at loadConfig (/home/pi/MagicMirror/js/app.js:69:14)
      at App.start (/home/pi/MagicMirror/js/app.js:212:3)
      [15.03.2022 19:58.23.450] [LOG] Loading module helpers …
      [15.03.2022 19:58.23.473] [LOG] Initializing new module helper …
      [15.03.2022 19:58.23.475] [LOG] Module helper loaded: updatenotification
      [15.03.2022 19:58.23.477] [LOG] No helper found for module: helloworld.
      [15.03.2022 19:58.23.478] [LOG] All module helpers loaded.
      [15.03.2022 19:58.23.591] [LOG] Starting server on port 8080 …
      [15.03.2022 19:58.23.610] [LOG] Server started …
      [15.03.2022 19:58.23.611] [LOG] Connecting socket for: updatenotification
      [15.03.2022 19:58.23.614] [LOG] Starting module helper: updatenotification
      [15.03.2022 19:58.23.614] [LOG] Sockets connected & modules started …
      [15.03.2022 19:58.23.896] [LOG] Launching application.
      [15.03.2022 19:58.32.631] [LOG] Shutting down server…
      [15.03.2022 19:58.32.633] [LOG] Stopping module helper: updatenotification

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Thona
        last edited by

        @thona said in mmm-avstock error:

        Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: ReferenceError: Cannot access ‘config’ before initialization

        syntax error.

        stop magicmirror

        then

        cd ~/MagicMirror
        npm run config:check
        

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          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