# How to install and use "node-red-contrib-mcp23017"

**URL:** <https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930>\
**Category:** General\
**Created:** [18 December 2018 09:17 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930 "2018-12-18T09:17:09Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andre/32/4554_2.png) [@Andre](https://discourse.nodered.org/u/Andre)\
**Post date:** [18 December 2018 09:17 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/1 "2018-12-18T09:17:09Z")

</div>

Hello everyone,

I would like to know how to install the node-red-contrib-mcp23017 node

> [node-red-contrib-mcp23017 (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-mcp23017)  
> but I only get error messages when I try to install it.

I don't understand how to install the extra modules,

> [GitHub - kaihenzler/node-mcp23017: Node.js library for the I2C I/O Expander MCP23017 on a Raspberry Pi](https://github.com/kaihenzler/node-mcp23017)

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [18 December 2018 09:19 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/2 "2018-12-18T09:19:03Z")

</div>

So what are the error messages? Please cut and paste them here...

---

<div class="post-metadata">

**Author:** ![Andre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andre/32/4554_2.png) [@Andre](https://discourse.nodered.org/u/Andre)\
**Post date:** [18 December 2018 09:31 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/3 "2018-12-18T09:31:54Z")

</div>

> gyp ERR! build error  
> gyp ERR! stack Error: `make` failed with exit code: 2  
> gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:276:23)  
> gyp ERR! stack at emitTwo (events.js:126:13)  
> gyp ERR! stack at ChildProcess.emit (events.js:214:7)  
> gyp ERR! stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:198:12)  
> gyp ERR! System Linux 4.14.79-v7+  
> gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"  
> gyp ERR! cwd /home/pi/.node-red/node\_modules/node-red-contrib-mcp23017/node\_modules/node-mcp23017/node\_modules/i2c  
> gyp ERR! node -v v8.11.1  
> gyp ERR! node-gyp -v v3.4.0  
> gyp ERR! not ok  
> npm WARN This failure might be due to the use of legacy binary "node"  
> npm WARN For further explanations, please read  
> /usr/share/doc/nodejs/README.Debian
> 
> npm ERR! i2c@0.1.4 install: `node-gyp rebuild`  
> npm ERR! Exit status 1  
> npm ERR!  
> npm ERR! Failed at the i2c@0.1.4 install script.  
> npm ERR! This is most likely a problem with the i2c package,  
> npm ERR! not with npm itself.  
> npm ERR! Tell the author that this fails on your system:  
> npm ERR! node-gyp rebuild  
> npm ERR! You can get their info via:  
> npm ERR! npm owner ls i2c  
> npm ERR! There is likely additional logging output above.
> 
> npm ERR! System Linux 4.14.79-v7+  
> npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "node-red-contrib-mcp23017"  
> npm ERR! cwd /home/pi/.node-red  
> npm ERR! node -v v8.11.1  
> npm ERR! npm -v 1.4.21  
> npm ERR! code ELIFECYCLE  
> npm ERR!  
> npm ERR! Additional logging details can be found in:  
> npm ERR! /home/pi/.node-red/npm-debug.log  
> npm ERR! not ok code 0  
> pi@raspberrypi:~/.node-red $

> **Error log 1**
>
> ```
> > pi@raspberrypi:~ $ cd ~/.node-red
> > pi@raspberrypi:~/.node-red $ npm install node-red-contrib-mcp23017
> > (node:1378) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
> > npm WARN deprecated coffee-script@1.3.3: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
> > /
> > > i2c@0.1.4 install /home/pi/.node-red/node_modules/node-red-contrib-mcp23017/node_modules/node-mcp23017/node_modules/i2c
> > > node-gyp rebuild
> > 
> > make: Entering directory '/home/pi/.node-red/node_modules/node-red-contrib-mcp23017/node_modules/node-mcp23017/node_modules/i2c/build'
> > CXX(target) Release/obj.target/i2c/src/i2c.o
> > ../src/i2c.cc: In function ‘void setAddress(int8_t)’:
> > ../src/i2c.cc:21:28: error: ‘New’ is not a member of ‘v8::String’
> > Exception::TypeError(String::New("Failed to set address"))
> > ^ ~~~~~
> > ../src/i2c.cc:22:5: error: ‘ThrowException’ was not declared in this scope
> > );
> > ^
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:26:32: error: ‘Arguments’ does not name a type
> > Handle<Value> SetAddress(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> SetAddress(const int&)’:
> > ../src/i2c.cc:27:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:29:16: error: invalid types ‘const int[int]’ for array subscript
> > addr = args[0]->Int32Value();
> > ^
> > ../src/i2c.cc:32:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(Undefined());
> > ^ ~~~~
> > ../src/i2c.cc:32:32: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’
> > return scope.Close(Undefined());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:313:27: note: declared here
> > friend Local<Primitive> Undefined(Isolate* isolate);
> > ^ ~~~~~~~~
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:35:26: error: ‘Arguments’ does not name a type
> > Handle<Value> Scan(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> Scan(const int&)’:
> > ../src/i2c.cc:36:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:39:58: error: invalid types ‘const int[int]’ for array subscript
> > Local<Function> callback = Local<Function>::Cast(args[0]);
> > ^
> > ../src/i2c.cc:40:38: error: invalid conversion from ‘int’ to ‘v8::Isolate*’ [-fpermissive]
> > Local<Array> results(Array::New(128));
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:3524:23: note: initializing argument 1 of ‘static v8::Local<v8::Array> v8::Array::New(v8::Isolate*, int)’
> > static Local<Array> New(Isolate* isolate, int length = 0);
> > ^~~
> > ../src/i2c.cc:41:45: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
> > Local<Value> err = Local<Value>::New(Null());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:314:27: note: declared here
> > friend Local<Primitive> Null(Isolate* isolate);
> > ^~~~
> > ../src/i2c.cc:53:37: error: no matching function for call to ‘v8::Integer::New(int&)’
> > results->Set(i, Integer::New(res));
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:2929:25: note: candidate: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
> > static Local<Integer> New(Isolate* isolate, int32_t value);
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:2929:25: note: candidate expects 2 arguments, 1 provided
> > ../src/i2c.cc:60:18: error: ‘GetCurrent’ is not a member of ‘v8::Context’
> > callback->Call(Context::GetCurrent()->Global(), argc, argv);
> > ^ ~~~~~~
> > ../src/i2c.cc:62:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(results);
> > ^ ~~~~
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:65:27: error: ‘Arguments’ does not name a type
> > Handle<Value> Close(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> Close(const int&)’:
> > ../src/i2c.cc:66:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:71:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(Undefined());
> > ^ ~~~~
> > ../src/i2c.cc:71:32: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’
> > return scope.Close(Undefined());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:313:27: note: declared here
> > friend Local<Primitive> Undefined(Isolate* isolate);
> > ^ ~~~~~~~~
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:74:26: error: ‘Arguments’ does not name a type
> > Handle<Value> Open(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> Open(const int&)’:
> > ../src/i2c.cc:75:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:77:34: error: invalid types ‘const int[int]’ for array subscript
> > String::Utf8Value device(args[0]);
> > ^
> > ../src/i2c.cc:79:45: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
> > Local<Value> err = Local<Value>::New(Null());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:314:27: note: declared here
> > friend Local<Primitive> Null(Isolate* isolate);
> > ^~~~
> > ../src/i2c.cc:83:28: error: ‘New’ is not a member of ‘v8::String’
> > err = Exception::Error(String::New("Failed to open I2C device"));
> > ^ ~~~~~
> > ../src/i2c.cc:86:13: error: invalid types ‘const int[int]’ for array subscript
> > if (args[1]->IsFunction()) {
> > ^
> > ../src/i2c.cc:88:60: error: invalid types ‘const int[int]’ for array subscript
> > Local<Function> callback = Local<Function>::Cast(args[1]);
> > ^
> > ../src/i2c.cc:91:20: error: ‘GetCurrent’ is not a member of ‘v8::Context’
> > callback->Call(Context::GetCurrent()->Global(), argc, argv);
> > ^ ~~~~~~
> > ../src/i2c.cc:94:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(Undefined());
> > ^ ~~~~
> > ../src/i2c.cc:94:32: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’
> > return scope.Close(Undefined());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:313:27: note: declared here
> > friend Local<Primitive> Undefined(Isolate* isolate);
> > ^ ~~~~~~~~
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:97:30: error: ‘Arguments’ does not name a type
> > Handle<Value> ReadByte(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> ReadByte(const int&)’:
> > ../src/i2c.cc:98:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:101:45: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
> > Local<Value> err = Local<Value>::New(Null());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:314:27: note: declared here
> > friend Local<Primitive> Null(Isolate* isolate);
> > ^~~~
> > ../src/i2c.cc:106:28: error: ‘New’ is not a member of ‘v8::String’
> > err = Exception::Error(String::New("Cannot read device"));
> > ^ ~~~~~
> > ../src/i2c.cc:108:28: error: no matching function for call to ‘v8::Integer::New(int8_t&)’
> > data = Integer::New(res);
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:2929:25: note: candidate: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
> > static Local<Integer> New(Isolate* isolate, int32_t value);
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:2929:25: note: candidate expects 2 arguments, 1 provided
> > ../src/i2c.cc:111:13: error: invalid types ‘const int[int]’ for array subscript
> > if (args[0]->IsFunction()) {
> > ^
> > ../src/i2c.cc:113:60: error: invalid types ‘const int[int]’ for array subscript
> > Local<Function> callback = Local<Function>::Cast(args[0]);
> > ^
> > ../src/i2c.cc:116:20: error: ‘GetCurrent’ is not a member of ‘v8::Context’
> > callback->Call(Context::GetCurrent()->Global(), argc, argv);
> > ^ ~~~~~~
> > ../src/i2c.cc:118:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(data);
> > ^ ~~~~
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:121:31: error: ‘Arguments’ does not name a type
> > Handle<Value> ReadBlock(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> ReadBlock(const int&)’:
> > ../src/i2c.cc:122:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:124:22: error: invalid types ‘const int[int]’ for array subscript
> > int8_t cmd = args[0]->Int32Value();
> > ^
> > ../src/i2c.cc:125:23: error: invalid types ‘const int[int]’ for array subscript
> > int32_t len = args[1]->Int32Value();
> > ^
> > ../src/i2c.cc:127:45: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
> > Local<Value> err = Local<Value>::New(Null());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:314:27: note: declared here
> > friend Local<Primitive> Null(Isolate* isolate);
> > ^~~~
> > ../src/i2c.cc:128:16: error: expected primary-expression before ‘*’ token
> > node::Buffer *buffer = node::Buffer::New(len);
> > ^
> > ../src/i2c.cc:128:17: error: ‘buffer’ was not declared in this scope
> > node::Buffer *buffer = node::Buffer::New(len);
> > ^ ~~~~~
> > ../src/i2c.cc:128:48: error: no matching function for call to ‘New(int32_t&)’
> > node::Buffer *buffer = node::Buffer::New(len);
> > ^
> > In file included from ../src/i2c.cc:2:0:
> > /usr/include/nodejs/src/node_buffer.h:52:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, size_t)
> > NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
> > ^~~
> > /usr/include/nodejs/src/node_buffer.h:52:40: note: candidate expects 2 arguments, 1 provided
> > /usr/include/nodejs/src/node_buffer.h:55:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding)
> > NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
> > ^~~
> > /usr/include/nodejs/src/node_buffer.h:55:40: note: candidate expects 3 arguments, 1 provided
> > /usr/include/nodejs/src/node_buffer.h:60:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t, node::Buffer::FreeCallback, void*)
> > NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
> > ^~~
> > /usr/include/nodejs/src/node_buffer.h:60:40: note: candidate expects 5 arguments, 1 provided
> > /usr/include/nodejs/src/node_buffer.h:67:40: note: candidate: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t)
> > NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
> > ^~~
> > /usr/include/nodejs/src/node_buffer.h:67:40: note: candidate expects 3 arguments, 1 provided
> > ../src/i2c.cc:130:29: error: ‘GetCurrent’ is not a member of ‘v8::Context’
> > Local<Object> globalObj = Context::GetCurrent()->Global();
> > ^ ~~~~~~
> > ../src/i2c.cc:131:76: error: ‘New’ is not a member of ‘v8::String’
> > <Function> bufferConstructor = Local<Function>::Cast(globalObj->Get(String::New("Buffer")));
> > ^ ~~~~~
> > ../src/i2c.cc:132:77: error: no matching function for call to ‘v8::Integer::New(int32_t&)’
> > <Value> constructorArgs[3] = { buffer->handle_, v8::Integer::New(len), v8::Integer::New(0) };
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:2929:25: note: candidate: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
> > static Local<Integer> New(Isolate* isolate, int32_t value);
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:2929:25: note: candidate expects 2 arguments, 1 provided
> > ../src/i2c.cc:132:98: error: no matching function for call to ‘v8::Integer::New(int)’
> > uctorArgs[3] = { buffer->handle_, v8::Integer::New(len), v8::Integer::New(0) };
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:2929:25: note: candidate: static v8::Local<v8::Integer> v8::Integer::New(v8::Isolate*, int32_t)
> > static Local<Integer> New(Isolate* isolate, int32_t value);
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:2929:25: note: candidate expects 2 arguments, 1 provided
> > ../src/i2c.cc:133:81: warning: ‘v8::Local<v8::Object> v8::Function::NewInstance(int, v8::Local<v8::Value>*) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
> > ocal<Object> actualBuffer = bufferConstructor->NewInstance(3, constructorArgs);
> > ^
> > In file included from /usr/include/nodejs/deps/v8/include/v8.h:26:0,
> > from /usr/include/nodejs/src/node.h:63,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:3847:31: note: declared here
> > Local<Object> NewInstance(int argc, Local<Value> argv[]) const);
> > ^
> > /usr/include/nodejs/deps/v8/include/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
> > declarator __attribute__ ((deprecated(message)))
> > ^ ~~~~~~~~~
> > ../src/i2c.cc:137:30: error: ‘New’ is not a member of ‘v8::String’
> > err = Exception::Error(String::New("Error reading length of bytes"));
> > ^ ~~~~~
> > ../src/i2c.cc:142:15: error: invalid types ‘const int[int]’ for array subscript
> > if (args[3]->IsFunction()) {
> > ^
> > ../src/i2c.cc:144:62: error: invalid types ‘const int[int]’ for array subscript
> > Local<Function> callback = Local<Function>::Cast(args[3]);
> > ^
> > ../src/i2c.cc:146:22: error: ‘GetCurrent’ is not a member of ‘v8::Context’
> > callback->Call(Context::GetCurrent()->Global(), argc, argv);
> > ^ ~~~~~~
> > ../src/i2c.cc:149:15: error: invalid types ‘const int[int]’ for array subscript
> > if (args[2]->IsNumber()) {
> > ^
> > ../src/i2c.cc:150:29: error: invalid types ‘const int[int]’ for array subscript
> > int32_t delay = args[2]->Int32Value();
> > ^
> > ../src/i2c.cc:156:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(actualBuffer);
> > ^ ~~~~
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:160:31: error: ‘Arguments’ does not name a type
> > Handle<Value> WriteByte(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> WriteByte(const int&)’:
> > ../src/i2c.cc:161:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:163:23: error: invalid types ‘const int[int]’ for array subscript
> > int8_t byte = args[0]->Int32Value();
> > ^
> > ../src/i2c.cc:164:45: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
> > Local<Value> err = Local<Value>::New(Null());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:314:27: note: declared here
> > friend Local<Primitive> Null(Isolate* isolate);
> > ^~~~
> > ../src/i2c.cc:167:28: error: ‘New’ is not a member of ‘v8::String’
> > err = Exception::Error(String::New("Cannot write to device"));
> > ^ ~~~~~
> > ../src/i2c.cc:170:13: error: invalid types ‘const int[int]’ for array subscript
> > if (args[1]->IsFunction()) {
> > ^
> > ../src/i2c.cc:172:60: error: invalid types ‘const int[int]’ for array subscript
> > Local<Function> callback = Local<Function>::Cast(args[1]);
> > ^
> > ../src/i2c.cc:175:20: error: ‘GetCurrent’ is not a member of ‘v8::Context’
> > callback->Call(Context::GetCurrent()->Global(), argc, argv);
> > ^ ~~~~~~
> > ../src/i2c.cc:178:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(Undefined());
> > ^ ~~~~
> > ../src/i2c.cc:178:32: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’
> > return scope.Close(Undefined());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:313:27: note: declared here
> > friend Local<Primitive> Undefined(Isolate* isolate);
> > ^ ~~~~~~~~
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:181:32: error: ‘Arguments’ does not name a type
> > Handle<Value> WriteBlock(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> WriteBlock(const int&)’:
> > ../src/i2c.cc:182:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:184:31: error: invalid types ‘const int[int]’ for array subscript
> > Local<Value> buffer = args[1];
> > ^
> > ../src/i2c.cc:186:22: error: invalid types ‘const int[int]’ for array subscript
> > int8_t cmd = args[0]->Int32Value();
> > ^
> > ../src/i2c.cc:190:45: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
> > Local<Value> err = Local<Value>::New(Null());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:314:27: note: declared here
> > friend Local<Primitive> Null(Isolate* isolate);
> > ^~~~
> > ../src/i2c.cc:193:28: error: ‘New’ is not a member of ‘v8::String’
> > err = Exception::Error(String::New("Cannot write to device"));
> > ^ ~~~~~
> > ../src/i2c.cc:196:13: error: invalid types ‘const int[int]’ for array subscript
> > if (args[2]->IsFunction()) {
> > ^
> > ../src/i2c.cc:198:60: error: invalid types ‘const int[int]’ for array subscript
> > Local<Function> callback = Local<Function>::Cast(args[2]);
> > ^
> > ../src/i2c.cc:201:20: error: ‘GetCurrent’ is not a member of ‘v8::Context’
> > callback->Call(Context::GetCurrent()->Global(), argc, argv);
> > ^ ~~~~~~
> > ../src/i2c.cc:204:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(Undefined());
> > ^ ~~~~
> > ../src/i2c.cc:204:32: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’
> > return scope.Close(Undefined());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:313:27: note: declared here
> > friend Local<Primitive> Undefined(Isolate* isolate);
> > ^ ~~~~~~~~
> > ../src/i2c.cc: At global scope:
> > ../src/i2c.cc:207:31: error: ‘Arguments’ does not name a type
> > Handle<Value> WriteWord(const Arguments& args) {
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘v8::Handle<v8::Value> WriteWord(const int&)’:
> > ../src/i2c.cc:208:15: error: ‘v8::HandleScope::HandleScope()’ is protected within this context
> > HandleScope scope;
> > ^ ~~~~
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:875:13: note: declared protected here
> > V8_INLINE HandleScope() {}
> > ^ ~~~~~~~~~~
> > ../src/i2c.cc:210:22: error: invalid types ‘const int[int]’ for array subscript
> > int8_t cmd = args[0]->Int32Value();
> > ^
> > ../src/i2c.cc:211:24: error: invalid types ‘const int[int]’ for array subscript
> > int16_t word = args[1]->Int32Value();
> 
> ```

---

<div class="post-metadata">

**Author:** ![Andre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andre/32/4554_2.png) [@Andre](https://discourse.nodered.org/u/Andre)\
**Post date:** [18 December 2018 09:32 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/4 "2018-12-18T09:32:20Z")

</div>

> **Error Log 2**
>
> ```
> > ^
> > ../src/i2c.cc:213:45: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Null(v8::Isolate*)’
> > Local<Value> err = Local<Value>::New(Null());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:314:27: note: declared here
> > friend Local<Primitive> Null(Isolate* isolate);
> > ^~~~
> > ../src/i2c.cc:216:28: error: ‘New’ is not a member of ‘v8::String’
> > err = Exception::Error(String::New("Cannot write to device"));
> > ^ ~~~~~
> > ../src/i2c.cc:219:13: error: invalid types ‘const int[int]’ for array subscript
> > if (args[2]->IsFunction()) {
> > ^
> > ../src/i2c.cc:221:60: error: invalid types ‘const int[int]’ for array subscript
> > Local<Function> callback = Local<Function>::Cast(args[2]);
> > ^
> > ../src/i2c.cc:224:20: error: ‘GetCurrent’ is not a member of ‘v8::Context’
> > callback->Call(Context::GetCurrent()->Global(), argc, argv);
> > ^ ~~~~~~
> > ../src/i2c.cc:227:16: error: ‘class v8::HandleScope’ has no member named ‘Close’
> > return scope.Close(Undefined());
> > ^ ~~~~
> > ../src/i2c.cc:227:32: error: too few arguments to function ‘v8::Local<v8::Primitive> v8::Undefined(v8::Isolate*)’
> > return scope.Close(Undefined());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:313:27: note: declared here
> > friend Local<Primitive> Undefined(Isolate* isolate);
> > ^ ~~~~~~~~
> > ../src/i2c.cc: In function ‘void Init(v8::Handle<v8::Object>)’:
> > ../src/i2c.cc:231:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
> > target->Set(String::NewSymbol("scan"),
> > ^ ~~~~~
> > ../src/i2c.cc:232:31: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
> > FunctionTemplate::New(Scan)->GetFunction());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
> > static Local<FunctionTemplate> New(
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
> > ../src/i2c.cc:234:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
> > target->Set(String::NewSymbol("setAddress"),
> > ^ ~~~~~
> > ../src/i2c.cc:235:37: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
> > FunctionTemplate::New(SetAddress)->GetFunction());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
> > static Local<FunctionTemplate> New(
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
> > ../src/i2c.cc:237:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
> > target->Set(String::NewSymbol("open"),
> > ^ ~~~~~
> > ../src/i2c.cc:238:31: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
> > FunctionTemplate::New(Open)->GetFunction());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
> > static Local<FunctionTemplate> New(
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
> > ../src/i2c.cc:240:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
> > target->Set(String::NewSymbol("close"),
> > ^ ~~~~~
> > ../src/i2c.cc:241:32: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
> > FunctionTemplate::New(Close)->GetFunction());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
> > static Local<FunctionTemplate> New(
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
> > ../src/i2c.cc:243:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
> > target->Set(String::NewSymbol("writeByte"),
> > ^ ~~~~~
> > ../src/i2c.cc:244:38: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
> > FunctionTemplate::New(WriteByte)->GetFunction());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
> > static Local<FunctionTemplate> New(
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
> > ../src/i2c.cc:246:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
> > target->Set(String::NewSymbol("writeBlock"),
> > ^ ~~~~~
> > ../src/i2c.cc:247:39: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
> > FunctionTemplate::New(WriteBlock)->GetFunction());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
> > static Local<FunctionTemplate> New(
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
> > ../src/i2c.cc:249:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
> > target->Set(String::NewSymbol("readByte"),
> > ^ ~~~~~
> > ../src/i2c.cc:250:35: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
> > FunctionTemplate::New(ReadByte)->GetFunction());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
> > static Local<FunctionTemplate> New(
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
> > ../src/i2c.cc:252:15: error: ‘NewSymbol’ is not a member of ‘v8::String’
> > target->Set(String::NewSymbol("readBlock"),
> > ^ ~~~~~
> > ../src/i2c.cc:253:36: error: no matching function for call to ‘v8::FunctionTemplate::New(v8::Handle<v8::Value> (&)(const int&))’
> > FunctionTemplate::New(ReadBlock)->GetFunction());
> > ^
> > In file included from /usr/include/nodejs/src/node.h:63:0,
> > from ../src/i2c.cc:1:
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: candidate: static v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::Isolate*, v8::FunctionCallback, v8::Local<v8::Value>, v8::Local<v8::Signature>, int, v8::ConstructorBehavior)
> > static Local<FunctionTemplate> New(
> > ^~~
> > /usr/include/nodejs/deps/v8/include/v8.h:5445:34: note: no known conversion for argument 1 from ‘v8::Handle<v8::Value>(const int&) {aka v8::Local<v8::Value>(const int&)}’ to ‘v8::Isolate*’
> > i2c.target.mk:91: recipe for target 'Release/obj.target/i2c/src/i2c.o' failed
> > make: *** [Release/obj.target/i2c/src/i2c.o] Error 1
> > make: Leaving directory '/home/pi/.node-red/node_modules/node-red-contrib-mcp23017/node_modules/node-mcp23017/node_modules/i2c/build'
> > gyp ERR! build error 
> > gyp ERR! stack Error: `make` failed with exit code: 2
> > gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:276:23)
> > gyp ERR! stack at emitTwo (events.js:126:13)
> > gyp ERR! stack at ChildProcess.emit (events.js:214:7)
> > gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
> > gyp ERR! System Linux 4.14.79-v7+
> > gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
> > gyp ERR! cwd /home/pi/.node-red/node_modules/node-red-contrib-mcp23017/node_modules/node-mcp23017/node_modules/i2c
> > gyp ERR! node -v v8.11.1
> > gyp ERR! node-gyp -v v3.4.0
> > gyp ERR! not ok 
> > npm WARN This failure might be due to the use of legacy binary "node"
> > npm WARN For further explanations, please read
> > /usr/share/doc/nodejs/README.Debian
> >  
> > npm ERR! i2c@0.1.4 install: `node-gyp rebuild`
> > npm ERR! Exit status 1
> > npm ERR! 
> > npm ERR! Failed at the i2c@0.1.4 install script.
> > npm ERR! This is most likely a problem with the i2c package,
> > npm ERR! not with npm itself.
> > npm ERR! Tell the author that this fails on your system:
> > npm ERR! node-gyp rebuild
> > npm ERR! You can get their info via:
> > npm ERR! npm owner ls i2c
> > npm ERR! There is likely additional logging output above.
> > 
> > npm ERR! System Linux 4.14.79-v7+
> > npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "node-red-contrib-mcp23017"
> > npm ERR! cwd /home/pi/.node-red
> > npm ERR! node -v v8.11.1
> > npm ERR! npm -v 1.4.21
> > npm ERR! code ELIFECYCLE
> > npm ERR! 
> > npm ERR! Additional logging details can be found in:
> > npm ERR! /home/pi/.node-red/npm-debug.log
> > npm ERR! not ok code 0
> > pi@raspberrypi:~/.node-red $ 
> 
> ```

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [18 December 2018 12:27 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/7 "2018-12-18T12:27:14Z")

</div>

What operating system are you doing this on? Is it a "lite" version?

Could you try installing the following

```auto
sudo apt-get install build-essential

```

and then retry

---

<div class="post-metadata">

**Author:** ![Andre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andre/32/4554_2.png) [@Andre](https://discourse.nodered.org/u/Andre)\
**Post date:** [18 December 2018 12:41 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/8 "2018-12-18T12:41:31Z")

</div>

Raspbian V12.3

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 December 2018 12:52 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/9 "2018-12-18T12:52:23Z")

</div>

> [@Andre](#):
>
> I don't understand how to install the extra modules,

Did you follow the instructions in the README at [https://github.com/kaihenzler/node-mcp23017](https://github.com/kaihenzler/node-mcp23017) and install that node?

---

<div class="post-metadata">

**Author:** ![Andre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andre/32/4554_2.png) [@Andre](https://discourse.nodered.org/u/Andre)\
**Post date:** [18 December 2018 13:03 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/10 "2018-12-18T13:03:23Z")

</div>

Hello,

I have installed it, or tried to install it, and the folders shown in the screenshot have been added. I think I did something wrong here and the errors come from it.

 ![2018-12-18-122300_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e43458fbdc354890e091ed2fe52a6953b925cea6.png)

Does someone have experience with adding this node and usage of the MCP23017 IC with Nod-Red?, or can someone explain/try how to install it? I saw on other websites that more people were having problems installing this node.

> **[Example Node-RED MCP23017 - IT Support](https://www.2hf.org/example-node-red-mcp23017-89/)**
>
> Node-RED MCP23017 How to, complete code from this Flow to import in your system the Raspberry PI mcp23017 Node-RED GPIO Port extender MCP23017

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 December 2018 13:16 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/11 "2018-12-18T13:16:27Z")

</div>

You have installed it in the wrong place. When you install nodes from the command line you should first go to the .node-red folder.

```bash
cd .node-red
npm install ......

```

[Edit]  
Or if you are not in the users home folder then

```bash
cd ~/.node-red
npm install .....

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 December 2018 13:19 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/12 "2018-12-18T13:19:23Z")

</div>

Are you doing this on a Pi?

Did you follow the node-mcp23017 README and

- change the `/etc/modules`
- Load kernel module
- Make device writable  
??

---

<div class="post-metadata">

**Author:** ![Andre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andre/32/4554_2.png) [@Andre](https://discourse.nodered.org/u/Andre)\
**Post date:** [18 December 2018 14:05 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/13 "2018-12-18T14:05:49Z")

</div>

> How can I save the added data in these 2 commands?

> 1. 
> 
> Add these two lines  
> i2c-bcm2708  
> i2c-dev
> 
> ![2018-12-18-135808_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/9df950051373bbdbb0bae6b8e51625aed9aded48.png)
> 
> ![2018-12-18-140225_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/26c008af5d0eca12b56108f693afbd26037a4907.png)

> 1. 
> 
> $ sudo vi /etc/modprobe.d/raspi-blacklist.conf
> 
> Comment out blacklist i2c-bcm2708
> 
> ```auto
> #blacklist i2c-bcm2708
> 
> ```
> 
> ![2018-12-18-140318_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/9aa824118d6a9dc20953431b44e876812fca3e6c.png)
> 
> ![2018-12-18-140444_800x480_scrot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/0/0aa48b395d957a82b8fa78d6869be063cefe9af5.png)

---

<div class="post-metadata">

**Author:** ![dewayneshorts](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@dewayneshorts](https://discourse.nodered.org/u/dewayneshorts)\
**Post date:** [10 May 2019 15:25 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/14 "2019-05-10T15:25:38Z")

</div>

I am having problems setting up pins as inputs on a 32 chan board. At first I could only get the first 8. Then I found this thread and went through all off the above. Now I can get all 16 on chip one (addressed 0x20). I am not able to get any of the inputs to recognize/see state change from chip 2 (addressed 0x22). Is there some special trick I am missing?  
Chip 1  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/7/7131beed97c32594f36fc9691150da04c91e3ab7.png)

When I run d i2cdetect -y 1 it only shows 0x20. Both chips are on the same board.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/4/46d9ba3ba3f643dd93d241482b4a496867ea26a8.png)

What steps am I missing?

---

<div class="post-metadata">

**Author:** ![Vittorio](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vittorio/32/47011_2.png) [@Vittorio](https://discourse.nodered.org/u/Vittorio)\
**Post date:** [9 January 2020 23:40 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/15 "2020-01-09T23:40:45Z")

</div>

Hi,  
I'm also struggling to install node-mcp23017 on raspbian, could anyone point me to the right versions of nodejs, nodered and npm, to get past those errors ?

---

<div class="post-metadata">

**Author:** ![vlturner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/vlturner/32/15211_2.png) [@vlturner](https://discourse.nodered.org/u/vlturner)\
**Post date:** [12 January 2020 05:19 UTC](https://discourse.nodered.org/t/how-to-install-and-use-node-red-contrib-mcp23017/5930/16 "2020-01-12T05:19:00Z")

</div>

See reply here

> [@Failing installing node-mcp23017](https://discourse.nodered.org/t/failing-installing-node-mcp23017/20144/17):
>
> I am using MCP23017 but had t do a lot to get it working. The best way to get it working is that you have to be in the directory node-red is installed on, My directory is /hom/pi/.node-red npm install i2c-bus@5.1.0 ├─┬ i2c-bus@5.1.0 │ ├── bindings@1.5.0 deduped │ └── nan@2.14.0 deduped (git+https://github.com/nodejs/nan.git#60e86a9d4c4536fbbd2a76814470edd66b23114e) ├── nan@2.14.0 (git+https://github.com/nodejs/nan.git#60e86a9d4c4536fbbd2a76814470edd66b23114e) You can see I also loaded th…
