hermanho / MMM-GooglePhotos

Display your photos on MagicMirror from Google Photos.
MIT License
162 stars 62 forks source link

Failure on Start: SyntaxError: Unexpected token . at Module._compile (internal/modules/cjs/loader.js:722:23) #174

Closed kaspaddy closed 7 months ago

kaspaddy commented 7 months ago

Hi, i try to install this Module but get an error when try to start. tried it already with different node versions but can't solve the problem.

Would be very happy if someone could help me fix this.

magicmirror@2.13.0 start /home/pi/MagicMirror DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js [2023-11-29 08:10:57.827] [LOG] Starting MagicMirror: v2.13.0 [2023-11-29 08:10:57.840] [LOG] Loading config ... [2023-11-29 08:10:57.862] [LOG] Loading module helpers ... [2023-11-29 08:10:57.866] [LOG] No helper found for module: alert. [2023-11-29 08:10:57.868] [LOG] No helper found for module: clock. [2023-11-29 08:10:57.870] [LOG] No helper found for module: currentweather. [2023-11-29 08:10:58.286] [ERROR] WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/https-proxy-agent/dist/index.js:54 this.proxyHeaders = opts?.headers ?? {}; ^ SyntaxError: Unexpected token . at Module._compile (internal/modules/cjs/loader.js:722:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/gaxios/build/src/gaxios.js:27:29) at Module._compile (internal/modules/cjs/loader.js:786:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) [2023-11-29 08:10:58.288] [LOG] Loading module helpers ... [2023-11-29 08:10:58.289] [LOG] No helper found for module: alert. [2023-11-29 08:10:58.290] [LOG] No helper found for module: clock. [2023-11-29 08:10:58.291] [LOG] No helper found for module: currentweather. [2023-11-29 08:10:58.313] [ERROR] App threw an error during load [2023-11-29 08:10:58.314] [ERROR] /home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/https-proxy-agent/dist/index.js:54 this.proxyHeaders = opts?.headers ?? {}; ^ SyntaxError: Unexpected token . at Module._compile (internal/modules/cjs/loader.js:722:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/gaxios/build/src/gaxios.js:27:29) at Module._compile (internal/modules/cjs/loader.js:786:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) [2023-11-29 08:10:58.317] [ERROR] Whoops! There was an uncaught exception... [2023-11-29 08:10:58.318] [ERROR] /home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/https-proxy-agent/dist/index.js:54 this.proxyHeaders = opts?.headers ?? {}; ^ SyntaxError: Unexpected token . at Module._compile (internal/modules/cjs/loader.js:722:23) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/google-auth-library/node_modules/gaxios/build/src/gaxios.js:27:29) at Module._compile (internal/modules/cjs/loader.js:786:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) at Module.load (internal/modules/cjs/loader.js:645:32) [2023-11-29 08:10:58.325] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [2023-11-29 08:10:58.326] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues [2023-11-29 08:10:58.504] [LOG] Launching application.

Thanks a lot

kaspaddy commented 7 months ago

updated everything with sudo apt update && sudo apt upgrade

updated node to 18.12.1

updated MagicMirror to newest version with git pull && npm run install-mm

and now it is running: sorry for opening the issue a bit too early ;)