# OpenPLC install error

**URL:** <https://discourse.nodered.org/t/openplc-install-error/15635>\
**Category:** General\
**Created:** [17 September 2019 19:45 UTC](https://discourse.nodered.org/t/openplc-install-error/15635 "2019-09-17T19:45:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Norrox](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Norrox](https://discourse.nodered.org/u/Norrox)\
**Post date:** [17 September 2019 19:45 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/1 "2019-09-17T19:45:40Z")

</div>

Hello guys, i get this error when i try to install openplc for node-red

[https://pastebin.com/dTCnDrNA](https://pastebin.com/dTCnDrNA)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [17 September 2019 20:00 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/2 "2019-09-17T20:00:29Z")

</div>

Please follow  
[https://nodered.org/docs/user-guide/runtime/adding-nodes](https://nodered.org/docs/user-guide/runtime/adding-nodes)

---

<div class="post-metadata">

**Author:** ![Norrox](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Norrox](https://discourse.nodered.org/u/Norrox)\
**Post date:** [17 September 2019 20:46 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/3 "2019-09-17T20:46:29Z")

</div>

Yes, well i have now and i get the same error, tried install from terminal in the node red dir and tried from the editor. tried installing serial port separate.  
this is the error from the editor

> **[2019-09-17T20:29:02.557Z \[err\] In file included from...](https://pastebin.com/DW0NC0Yt)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

and this does not exist

> [https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.7/serialport-v4.0.7-node-v64-linux-arm.tar.gz](https://github.com/EmergingTechnologyAdvisors/node-serialport/releases/download/4.0.7/serialport-v4.0.7-node-v64-linux-arm.tar.gz)

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [17 September 2019 20:54 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/4 "2019-09-17T20:54:18Z")

</div>

Serial port exists.

 ![39](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/2acdb7036952a8ef384044914867b1c6fdbdd9c9.jpeg)

---

<div class="post-metadata">

**Author:** ![Norrox](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Norrox](https://discourse.nodered.org/u/Norrox)\
**Post date:** [17 September 2019 21:02 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/5 "2019-09-17T21:02:15Z")

</div>

i know, but i tried reinstall it, why does not openplc recognize its there?

---

<div class="post-metadata">

**Author:** ![ajhart](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@ajhart](https://discourse.nodered.org/u/ajhart)\
**Post date:** [13 December 2019 09:49 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/6 "2019-12-13T09:49:42Z")

</div>

Hi...Having the same problem: node-red-node-serialport v0.10.0 installed and does not recognize install:

```auto
serialport.target.mk:109: recipe for target 'Release/obj.target/serialport/src/serialport.o' failed
make: *** [Release/obj.target/serialport/src/serialport.o] Error 1
make: Leaving directory '/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.14.98-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build/Release"
gyp ERR! cwd /home/pi/.node-red/node_modules/node-modbus/node_modules/serialport
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build/Release' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Linux 4.14.98-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/.node-red/node_modules/node-modbus/node_modules/serialport
node-pre-gyp ERR! node -v v12.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build/Release' (1)
serialport.target.mk:109: recipe for target 'Release/obj.target/serialport/src/serialport.o' failed
make: *** [Release/obj.target/serialport/src/serialport.o] Error 1
make: Leaving directory '/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.14.98-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/home/pi/.node-red/node_modules/node-modbus/node_modules/serialport/build/Release"
gyp ERR! cwd /home/pi/.node-red/node_modules/node-modbus/node_modules/serialport
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN notsup Unsupported engine for node-red-contrib-modbus@1.3.0: wanted: {"node":"6.x"} (current: {"node":"12.13.1","npm":"6.13.3"})
npm WARN notsup Not compatible with your version of node/npm: node-red-contrib-modbus@1.3.0
npm WARN node-red-contrib-ui-led@0.3.1 requires a peer of node-red-dashboard@2.14.x but none is installed. You must install peer dependencies yourself.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@4.0.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@4.0.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

```

Any advice?

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [13 December 2019 13:23 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/7 "2019-12-13T13:23:07Z")

</div>

And you installed this using the editor ? (menu -\> manage palette -\> install tab -\> search serial, install ?)

---

<div class="post-metadata">

**Author:** ![ajhart](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@ajhart](https://discourse.nodered.org/u/ajhart)\
**Post date:** [13 December 2019 17:37 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/8 "2019-12-13T17:37:05Z")

</div>

Via UI or CLI, results are the same...

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [13 December 2019 17:42 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/9 "2019-12-13T17:42:13Z")

</div>

maybe try with --unsafe-perm option

```auto
cd ~/.node-red
npm i --unsafe-perm node-red-node-serialport@latest

```

Though I note later on the modbus node is complaining about the version of nodejs... which is bad... as node6 is out of support. So either the node should stop being used/uninstalled or fixed.

---

<div class="post-metadata">

**Author:** ![ajhart](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@ajhart](https://discourse.nodered.org/u/ajhart)\
**Post date:** [15 December 2019 21:18 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/10 "2019-12-15T21:18:36Z")

</div>

Unfortunately did not work. I uninstalled modbus and serialport followed by;

```auto
cd ~/.node-red
npm i --unsafe-perm node-red-node-serialport@latest
npm install node-red-contrib-openplc

```

But no campaign ....

```auto
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/build/Release' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:210:5)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Linux 4.14.98-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport
node-pre-gyp ERR! node -v v12.13.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/build/Release' (1)
serialport.target.mk:109: recipe for target 'Release/obj.target/serialport/src/serialport.o' failedipt
make: *** [Release/obj.target/serialport/src/serialport.o] Error 1
make: Leaving directory '/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:210:5)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.14.98-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport/build/Release"
gyp ERR! cwd /home/pi/.node-red/node_modules/modbus-serial/node_modules/serialport
gyp ERR! node -v v12.13.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN notsup Unsupported engine for node-red-contrib-modbus@1.3.0: wanted: {"node":"6.x"} (current: {"node":"12.13.1","npm":"6.13.3"})
npm WARN notsup Not compatible with your version of node/npm: node-red-contrib-modbus@1.3.0
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! serialport@4.0.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@4.0.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-12-15T21_14_32_313Z-debug.log

```

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [15 December 2019 21:37 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/11 "2019-12-15T21:37:52Z")

</div>

Ah right yes - they are trying to install serialport@4.0.7 which is too old for node v12. This seems to be coming from their dependency on node-red-contrib-modbus - which indeed has been having issues of late.

---

<div class="post-metadata">

**Author:** ![ajhart](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@ajhart](https://discourse.nodered.org/u/ajhart)\
**Post date:** [16 December 2019 09:18 UTC](https://discourse.nodered.org/t/openplc-install-error/15635/12 "2019-12-16T09:18:25Z")

</div>

Thank you for your reply...According to node-red-modbus github, NodeJS v12 is not supported.
