# Node-red-contrib-canbus install failed

**URL:** https://discourse.nodered.org/t/node-red-contrib-canbus-install-failed/7160
**Category:** General
**Created:** [23 January 2019 07:01 UTC](https://discourse.nodered.org/t/node-red-contrib-canbus-install-failed/7160 "2019-01-23T07:01:21Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bobet21](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobet21/32/3162_2.png) [@Bobet21](https://discourse.nodered.org/u/Bobet21)
#### Post date: [23 January 2019 07:01 UTC](https://discourse.nodered.org/t/node-red-contrib-canbus-install-failed/7160/1 "2019-01-23T07:01:21Z")

</div>

Hello,

I am trying to re install the node-red-contrib-canbus which was working fine previoulsy, they made some changes on the Git source and since then it seems I am not able to install that node. I belive the node red package needs to be updated to match the new version requirements but I am not sure how to do this.

```
imake: *** [Release/obj.target/can_signals/src/signals.o] Erreur 1
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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.79-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/.node-red/node_modules/node-red-contrib-canbus/node_modules/socketcan
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
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! socketcan@2.1.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the socketcan@2.1.3 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-01-23T06_48_02_657Z-debug.log

```

On the end of the npm package i get thoses warning after installing npm socketcan

```
/home/pi/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here

Local&lt;Object&gt; Value::ToObject() const {

^ ~~~~

SOLINK_MODULE(target) Release/obj.target/can_signals.node

COPY Release/can_signals.node

make : on quitte le répertoire « /home/pi/node_modules/socketcan/build »

npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'

npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'

npm WARN pi No description

npm WARN pi No repository field.

npm WARN pi No README data

npm WARN pi No license field.

+ [socketcan@2.4.0](mailto:socketcan@2.4.0)

updated 1 package and audited 11 packages in 19.04s

found 0 vulnerabilities
```

---

<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: [23 January 2019 09:51 UTC](https://discourse.nodered.org/t/node-red-contrib-canbus-install-failed/7160/2 "2019-01-23T09:51:42Z")

</div>

> [@Bobet21](#):
>
> I am trying to re install the node-red-contrib-canbus which was working fine previoulsy

What command are you using to install it and from which directory? The log seems to suggest you are running it from `/home/pi` instead of `/home/pi/.node-red`.

---

<div class="post-metadata">

### Author: ![Bobet21](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobet21/32/3162_2.png) [@Bobet21](https://discourse.nodered.org/u/Bobet21)
#### Post date: [1 February 2019 17:54 UTC](https://discourse.nodered.org/t/node-red-contrib-canbus-install-failed/7160/3 "2019-02-01T17:54:44Z")

</div>

Well, for the first one i am basically installing it from the palette from inside node.red so i would be surprise not to point on the right location. For the second, i run this npm install from the root itself as this is not purely related to node.red. Installing in the .node-red directory the socketcan module doesn't work either...

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [1 February 2019 18:39 UTC](https://discourse.nodered.org/t/node-red-contrib-canbus-install-failed/7160/4 "2019-02-01T18:39:49Z")

</div>

> [@Bobet21](#):
>
> npm install from the root itself as this is not purely related to node.red. Installing in the .node-red directory the socketcan module doesn't work either...

Generally, if you feel you are being forced to do a global install to get a node working, there is something else wrong since there should be no reason for this.

The most common issue is a user permissions issue. Quite possibly, the user being used to run Node-RED doesn't have the right permissions so you need to trace back to what needs to be accessed, find out what permissions it requires and then update your user accordingly.

For example, accessing some hardware on a Linux server often requires the user to be a member of a group such as `wheel`.

This is a common BlueTooth installation issue.

> [@Bobet21](#):
>
> I belive the node red package needs to be updated to match the new version requirements but I am not sure how to do this.

You will need to raise an issue with the node's author.

In the meantime, you can always install a specific version of a node from the command line something like the following:

```auto
# Go to the right place - the userDir folder, usually in this location:
cd ~/.node-red
# Install the specific version required:
npm install node-red-contrib-canbus@<version-required>

```

You may need to look up the required version from the npmjs web site or GitHub.
