sanzgiri / dash-sms

Send an SMS when an Amazon Dash button is pressed
MIT License
46 stars 15 forks source link

Unexpected token ? #3

Open realfire23 opened 7 years ago

realfire23 commented 7 years ago

Hi,

I have entered twilo credentials but iam unable to get this service running.

SyntaxError: /home/pi/node_modules/dash-sms/config.json: Unexpected token / at Object.parse (native) at Object.Module._extensions..json (module.js:450:27) at Module.load (module.js:356:32) at Function.Module._load (module.js:311:12) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (/home/pi/node_modules/dash-sms/index.js:3:16) at Module._compile (module.js:435:26) at Object.Module._extensions..js (module

mertozsaydi commented 7 years ago

Try to install node-dash-button first and then run the application 🍻

$ sudo apt-get install libpcap-dev
$ npm install node-dash-button
durul commented 7 years ago

Hello,

There is a problem npm install node-dash-button command. I receive same error message.

➜ dash-sms-master npm install node-dash-button

pcap@2.0.0 install /Users/duruldalkanat/Downloads/dash-sms-master/node_modules/pcap node-gyp rebuild

CXX(target) Release/obj.target/pcap_binding/pcap_binding.o CXX(target) Release/obj.target/pcap_binding/pcap_session.o ../pcap_session.cc:46:37: warning: 'NewInstance' is deprecated [-Wdeprecated-declarations] info.GetReturnValue().Set(cons->NewInstance()); ^ /Users/duruldalkanat/.node-gyp/7.9.0/include/node/v8.h:3662:52: note: 'NewInstance' has been explicitly marked deprecated here V8_DEPRECATED("Use maybe version", Local NewInstance() const); ^ 1 warning generated. SOLINK_MODULE(target) Release/pcap_binding.node dash-sms@1.0.0 /Users/duruldalkanat/Downloads/dash-sms-master └─┬ node-dash-button@0.5.5 └── pcap@2.0.0 (git+https://github.com/mranney/node_pcap.git#d920204745c8b00ef4b7a3fe27d902b263cdb70f)

npm WARN dash-sms@1.0.0 No repository field.

dsl89125 commented 7 years ago

its a possible solution to your error 1: make sure you have downloaded index.js, config.json and package.json in one folder 2: in config.json delete all comments 3: in target directory run $ npm install 4: run $ sudo node index.js

coolandsmartrr commented 5 years ago

Yeah, you have to delete the comments in the JSON file.