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

Can't run it, need help! #8

Open
zdqxxx124 opened this issue Mar 9, 2018 · 5 comments
Open

Can't run it, need help! #8

zdqxxx124 opened this issue Mar 9, 2018 · 5 comments

Comments

@zdqxxx124
Copy link

I tried step by step, and getting error following:

`pi@raspi:~/Smartphone-Doorlock $ sudo node doorlock.js
fs.js:91
throw new errors.TypeError('ERR_INVALID_ARG_TYPE',
^

TypeError [ERR_INVALID_ARG_TYPE]: The "options" argument must be one of type string or Object. Received type number
at getOptions (fs.js:91:11)
at fs.readFileSync (fs.js:570:13)
at Array.map ()
at exports.SslClient.connect (/home/pi/Smartphone-Doorlock/node_modules/blynk-library/blynk-node.js:169:42)
at doConnect (/home/pi/Smartphone-Doorlock/node_modules/blynk-library/blynk.js:546:15)
at Blynk.connect (/home/pi/Smartphone-Doorlock/node_modules/blynk-library/blynk.js:559:5)
at new Blynk (/home/pi/Smartphone-Doorlock/node_modules/blynk-library/blynk.js:385:10)
at Object. (/home/pi/Smartphone-Doorlock/doorlock.js:58:13)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
`

@lisaong
Copy link
Contributor

lisaong commented Apr 26, 2018

This is an issue with the Blynk library: vshymanskyy/blynk-library-js#26, try updating package.json to use the latest library.

diff --git a/package.json b/package.json
index 5f1367e..1063c50 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
   "author": "",
   "license": "ISC",
   "dependencies": {
-    "blynk-library": "0.0.41",
+    "blynk-library": "0.5.1",
     "onoff": "^1.1.1",
     "pigpio": "^0.4.0"
   }

@SIDECHAIN3D
Copy link

Encountered same issue. A simple "sudo npm rebuild" did the trick.

@Scout-lander
Copy link

hi im also having running issues

throw err
^

Error: Could not locate the bindings file. Tried:
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/build/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/build/Debug/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/build/Release/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/out/Debug/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/Debug/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/out/Release/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/Release/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/build/default/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/compiled/10.11.0/linux/arm/pigpio.node
at bindings (/home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/node_modules/bindings/bindings.js:88:9)
at Object. (/home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/pigpio.js:5:31)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/home/pi/cam/Smartphone-Doorlock/doorlock.js:47:12)

@Mr-Black-Dahlia
Copy link

hi im also having running issues

throw err
^

Error: Could not locate the bindings file. Tried:
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/build/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/build/Debug/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/build/Release/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/out/Debug/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/Debug/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/out/Release/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/Release/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/build/default/pigpio.node
→ /home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/compiled/10.11.0/linux/arm/pigpio.node
at bindings (/home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/node_modules/bindings/bindings.js:88:9)
at Object. (/home/pi/cam/Smartphone-Doorlock/node_modules/pigpio/pigpio.js:5:31)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/home/pi/cam/Smartphone-Doorlock/doorlock.js:47:12)

Don't follow the suggested guide to install node or npm. :) Start over and just use apt-get. Worked for me!

@jgonzales489
Copy link

How did you bbn I stall node then if I type npm-get it throws locked issues

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

6 participants