Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version problem maybe #6

Open
sebastianet opened this issue Feb 14, 2019 · 1 comment
Open

version problem maybe #6

sebastianet opened this issue Feb 14, 2019 · 1 comment

Comments

@sebastianet
Copy link

sebastianet commented Feb 14, 2019

Hi - I am trying to run your code on my Raspberry reading

https://tutorials-raspberrypi.com/setup-raspberry-pi-node-js-webserver-control-gpios/

Its quite a new soft and hw :

sag@odin:~/Raspberry-Pi-Simple-Web-GPIO-GUI $ uname -a Linux odin 4.4.11-v7+ #888 SMP Mon May 23 20:10:33 BST 2016 armv7l GNU/Linux

I upgraded before running (using sudo apt-get update) your code,
but when I run "sag@odin:~/Raspberry-Pi-Simple-Web-GPIO-GUI $ sudo npm start"
... I get a strange error :

`> Raspberry-Pi-Simple-Web-GPIO-GUI@1.0.0 start /home/sag/Raspberry-Pi-Simple-Web-GPIO-GUI

node ./bin/www

/home/sag/Raspberry-Pi-Simple-Web-GPIO-GUI/node_modules/dotenv/lib/main.js:45
let value = keyValueArr[2] || ''
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:387:25)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object. (/home/sag/Raspberry-Pi-Simple-Web-GPIO-GUI/app.js:12:1)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)

npm ERR! Linux 4.4.11-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v5.12.0
npm ERR! npm v4.3.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Raspberry-Pi-Simple-Web-GPIO-GUI@1.0.0 start: node ./bin/www
npm ERR! Exit status 1
`

Any clue ?

@sebastianet
Copy link
Author

looks it is fixed including

'use strict';

in file "./node_modules/dotenv/lib/main.js"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant