I am installing Blynk on my Raspberry Pi 3 Model B with the ARMv7 chipset.
I have had the blynk.js script work before but now I am having issues running this simple script.
I have re-installed Raspbian multiple times, but to no avail I cannot get it working again.
I am following the install guide for Raspberry Pi on the Blynk DOCS page, and it goes a little something like this:
1.) Add the Adafruit package repository. (Within this package installation it removes nodered)
curl -sLS https://apt.adafruit.com/add | sudo bash
2.) Install the “newest”(please note the quotes as I will mention below) version of nodejs.
sudo apt-get install node
3.) Update and Upgrade
sudo apt-get update && sudo apt-get upgrade
4.) Install build-essential
sudo apt-get install build-essential
5.) Install Node package manager
sudo npm install -g npm
6.) Install onoff package (This is where I run into issues)
pi@raspberrypi:~ $ sudo npm install -g onoff
npm WARN npm npm does not support Node.js v0.12.6
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/
> epoll@0.1.20 install /usr/local/lib/node_modules/onoff/node_modules/epoll
> node-gyp rebuild
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.12.6"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp"
make: Entering directory '/usr/local/lib/node_modules/onoff/node_modules/epoll/build'
CXX(target) Release/obj.target/epoll/src/epoll.o
In file included from /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8stdint.h:13:0,
from /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8.h:18,
from ../src/epoll.cc:11:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h: In function ‘void node::FatalException(const v8::TryCatch&)’:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:275:61: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:270): Use ParseEncoding(isolate, ...) [-Wdeprecated-declarations]
return FatalException(v8::Isolate::GetCurrent(), try_catch);
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:273:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use FatalException(isolate, ...)",
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h: In function ‘v8::Local<v8::Value> node::Encode(const void*, size_t, node::encoding)’:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:287:62: warning: ‘v8::Local<v8::Value> node::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
return Encode(v8::Isolate::GetCurrent(), buf, len, encoding);
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:282:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use Encode(isolate, ...)",
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h: In function ‘ssize_t node::DecodeBytes(v8::Handle<v8::Value>, node::encoding)’:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:298:62: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handle<v8::Value>, node::encoding)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:291): Use Encode(isolate, ...) [-Wdeprecated-declarations]
return DecodeBytes(v8::Isolate::GetCurrent(), val, encoding);
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:294:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use DecodeBytes(isolate, ...)",
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h: In function ‘ssize_t node::DecodeWrite(char*, size_t, v8::Handle<v8::Value>, node::encoding)’:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:312:75: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handle<v8::Value>, node::encoding)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:302): Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
return DecodeWrite(v8::Isolate::GetCurrent(), buf, buflen, val, encoding);
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:307:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use DecodeWrite(isolate, ...)",
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local<v8::Object> node::Buffer::New(v8::Handle<v8::String>, node::encoding)’:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:58:52: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, v8::Handle<v8::String>, node::encoding)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:52): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), string, enc);
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:55:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local<v8::Object> node::Buffer::New(const char*, size_t)’:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:67:50: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:62): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), data, len);
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:65:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local<v8::Object> node::Buffer::New(char*, size_t, node::smalloc::FreeCallback, void*)’:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:80:69: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t, node::smalloc::FreeCallback, void*)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:70): Use New(isolate, ...) [-Wdeprecated-declarations]
return New(v8::Isolate::GetCurrent(), data, length, callback, hint);
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:75:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use New(isolate, ...)",
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h: In function ‘v8::Local<v8::Object> node::Buffer::Use(char*, uint32_t)’:
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:90:50: warning: ‘v8::Local<v8::Object> node::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:85): Use New(isolate, ...) [-Wdeprecated-declarations]
return Use(v8::Isolate::GetCurrent(), data, len);
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/deps/v8/include/v8config.h:313:1: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^
/usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:88:1: note: in expansion of macro ‘NODE_DEPRECATED’
NODE_DEPRECATED("Use Use(isolate, ...)",
^
In file included from ../src/epoll.cc:15:0:
../../nan/nan.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::NewBuffer(char*, size_t, node::smalloc::FreeCallback, void*)’:
../../nan/nan.h:685:64: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t, node::smalloc::FreeCallback, void*)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:70): Use New(isolate, ...) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), data, length, callback, hint));
^
../../nan/nan.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::CopyBuffer(const char*, uint32_t)’:
../../nan/nan.h:701:46: warning: ‘v8::Local<v8::Object> node::Buffer::New(v8::Isolate*, const char*, size_t)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:62): Use New(isolate, ...) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), data, size));
^
../../nan/nan.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::NewBuffer(char*, uint32_t)’:
../../nan/nan.h:729:64: warning: ‘v8::Local<v8::Object> node::Buffer::Use(v8::Isolate*, char*, uint32_t)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node_buffer.h:85): Use New(isolate, ...) [-Wdeprecated-declarations]
node::Buffer::Use(v8::Isolate::GetCurrent(), data, size));
^
../../nan/nan.h: In function ‘void Nan::FatalException(const Nan::TryCatch&)’:
../../nan/nan.h:850:73: warning: ‘void node::FatalException(v8::Isolate*, const v8::TryCatch&)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:270): Use ParseEncoding(isolate, ...) [-Wdeprecated-declarations]
node::FatalException(v8::Isolate::GetCurrent(), try_catch.try_catch_);
^
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::Encode(const void*, size_t, Nan::Encoding)’:
../../nan/nan.h:1760:44: warning: ‘v8::Local<v8::Value> node::Encode(v8::Isolate*, const void*, size_t, node::encoding)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:278): Use FatalException(isolate, ...) [-Wdeprecated-declarations]
, static_cast<node::encoding>(encoding));
^
../../nan/nan.h: In function ‘ssize_t Nan::DecodeBytes(v8::Local<v8::Value>, Nan::Encoding)’:
../../nan/nan.h:1776:44: warning: ‘ssize_t node::DecodeBytes(v8::Isolate*, v8::Handle<v8::Value>, node::encoding)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:291): Use Encode(isolate, ...) [-Wdeprecated-declarations]
, static_cast<node::encoding>(encoding));
^
../../nan/nan.h: In function ‘ssize_t Nan::DecodeWrite(char*, size_t, v8::Local<v8::Value>, Nan::Encoding)’:
../../nan/nan.h:1798:44: warning: ‘ssize_t node::DecodeWrite(v8::Isolate*, char*, size_t, v8::Handle<v8::Value>, node::encoding)’ is deprecated (declared at /usr/local/lib/node_modules/onoff/node_modules/epoll/.node-gyp/0.12.6/src/node.h:302): Use DecodeBytes(isolate, ...) [-Wdeprecated-declarations]
, static_cast<node::encoding>(encoding));
^
SOLINK_MODULE(target) Release/obj.target/epoll.node
COPY Release/epoll.node
make: Leaving directory '/usr/local/lib/node_modules/onoff/node_modules/epoll/build'
/usr/local/lib
└─┬ onoff@1.1.1
└─┬ epoll@0.1.20
├── bindings@1.2.1
└── nan@2.4.0
Issues to address:
-
What are the differences between node and nodejs?
-
The node version I have installed v0.12.6
-
The nodejs version I have installed is v0.10.29
-
The npm version I have installed is 4.1.2
I have tried alternative methods before to installing the latest version of nodejs (http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/) I believe to be 7.4.0 by using another package repository, but run into similar issues.
I am fairly new to Raspberry Pi and Raspbian, but have been using *nix type systems on and off for around 10 years. I am a junior in an Electrical Engineering BTech ABET program, which does not have a lot of programming requirements as far as Java and such. But I have used C and MATLAB and understand the basic concepts of programming.
So any help would be appreciated, as Costas has helped me tremendously before, I was to the point where I was having issues running scripts at startup, but it now seems like I have taken 2 steps back.
Thanks.