yayza / Plex-TP-Link-Kasa

Dim Kasa lights using Plex webhooks
1 stars 1 forks source link

SyntaxError: Unexpected token '.' #1

Closed thamind closed 2 years ago

thamind commented 2 years ago

pi@plexpi:~/node_modules/plex-kasa $ npm start

plex-kasa@1.0.0 start nodemon server.js

[nodemon] 2.0.19 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] starting node server.js /home/pi/node_modules/plex-kasa/server.js:43 const data = JSON.parse(req.body?.payload); ^

SyntaxError: Unexpected token '.' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47 [nodemon] app crashed - waiting for file changes before starting...

yayza commented 2 years ago

Try updating Node , then delete the node_modules folder and run npm install again.

thamind commented 2 years ago

This is now working! Thank you so much! Whats your paypal email? would like to bless you with a gift..

yayza commented 2 years ago

Glad to hear it 😊. I really appreciate it thank you! My Paypal is yayza@proton.me