hermanho / MMM-GooglePhotos

Display your photos on MagicMirror from Google Photos.
MIT License
170 stars 65 forks source link

SyntaxError: Unexpected identifier #23

Closed carterpe closed 5 years ago

carterpe commented 5 years ago

Hi, since the update to fix opn, I get the following error. Mirror won't start. removing the module from the config allows the mirror to start correctly. Tried to rollback but failed.

The ^^^^ is under 'path'.

Thanks

pi@PicturePi:~/MagicMirror/modules/MMM-GooglePhotos $ node auth_and_test.js
/home/pi/MagicMirror/modules/MMM-GooglePhotos/node_modules/open/index.js:11
const wslToWindowsPath = async path => {
^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:549:28)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.require (module.js:504:17)
at require (internal/module.js:20:19)
at Object. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/auth.js:6:13)

eouia commented 5 years ago

It's very weird thing. After git pull, Did you npm install in MMM-GooglePhotos directory?

carterpe commented 5 years ago

Yes. I tried npm install. Then I renamed the MMM-GooglePhotos directory and started fresh. Then I found this https://github.com/tapio/live-server/issues/305 which is the same issue and points to an out of date NodeJS. So I tried several different versions. But that didn't help the situation. On the mirror I currently have 8.9.1 and now get the error -

module.js:538 throw err; ^

Error: Cannot find module './credentials.json' at Function.Module._resolveFilename (module.js:536:15) at Function.Module._load (module.js:466:25) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at new Auth (/home/pi/MagicMirror/modules/MMM-GooglePhotos/auth.js:31:15) at Object. (/home/pi/MagicMirror/modules/MMM-GooglePhotos/auth_and_test.js:16:14) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12)

I haven't had time to try anything different. MagicMirror is up to date, pi is up to date.

eouia commented 5 years ago

Error: Cannot find module './credentials.json' at Function.Module._resolveFilename

hmmm. this error is another thing. you've probably missed your credentials.json on newly installed module.

eouia commented 5 years ago

Have you still got a problem? I'll close this issue because there is no more feedback. Have a nice day.