randomBrainstormer/MMM-GoogleCalendar

Issue Running node authorize.js

mosco42 opened this issue · 2 comments

Hey everyone!

Beginner here... I'm VNC'd into the pi to run this program and here's what terminal is throwing at me when I try to run node authorize.js:

pi@raspberrypi:~/MagicMirror/modules/MMM-GoogleCalendar $ node authorize.js
node:internal/modules/cjs/loader:998
throw err;
^

Error: Cannot find module '@google-cloud/local-auth'
Require stack:

  • /home/pi/MagicMirror/modules/MMM-GoogleCalendar/authorize.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Function.Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1067:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (/home/pi/MagicMirror/modules/MMM-GoogleCalendar/authorize.js:4:24)
    at Module._compile (node:internal/modules/cjs/loader:1165:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
    at Module.load (node:internal/modules/cjs/loader:1043:32)
    at Function.Module._load (node:internal/modules/cjs/loader:878:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [ '/home/pi/MagicMirror/modules/MMM-GoogleCalendar/authorize.js' ]
    }

The API is enabled and I have tried all 3 types of client IDs (desktop, web application, TV and Limited input). Thoughts?

Thanks y'all!

Figured it out. Had to install some other things first. The learning continues!

Can you please add what was missing? I am getting the same error