# Plexamp for Raspberry Pi - Node incompatibility

**URL:** <https://forums.plex.tv/t/plexamp-for-raspberry-pi-node-incompatibility/427310>\
**Category:** Plex Labs\
**Tags:** plexamp\
**Created:** [June 27, 2019, 3:00pm UTC](https://forums.plex.tv/t/plexamp-for-raspberry-pi-node-incompatibility/427310 "2019-06-27T15:00:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![timheslop](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@timheslop](https://forums.plex.tv/u/timheslop)\
**Post date:** [June 27, 2019, 3:00pm UTC](https://forums.plex.tv/t/plexamp-for-raspberry-pi-node-incompatibility/427310/1 "2019-06-27T15:00:27Z")

</div>

Hi there

I have got one install of Plexamp for Pi headless working, however I have come to build another and am struggling. I think that the repos with Node in have moved along and we need a recompile of the client.

I am using the latest and greatest raspbian (buster) and following the instructions, it appears that everything works, however when I come to run it it doesn’t register with the server.

using

```auto
sudo systemctl status plexamp 

```

I can see that the service continually restarts as the Active line shows that it never runs for longer than a few seconds

To debug this, I have run it at the command line, using

```auto
/usr/bin/node /home/pi/plexamp/server/server.prod.js

```

It throws an error and gives the following info:

```auto
/home/pi/plexamp/server/node_modules/bindings/bindings.js:83
        throw e
        ^

Error: The module '/home/pi/plexamp/server/node_modules/serialport/build/Release/serialport.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at bindings (/home/pi/plexamp/server/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/home/pi/plexamp/server/node_modules/serialport/lib/bindings.js:3:35)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)

```

I have run out of skill to correct this, but if it is happening to me, then I am not going to be the only one …

Any chance of some guidance or a new release?

Thanks

Tim

---

<div class="post-metadata">

**Author:** ![timheslop](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@timheslop](https://forums.plex.tv/u/timheslop)\
**Post date:** [June 27, 2019, 8:21pm UTC](https://forums.plex.tv/t/plexamp-for-raspberry-pi-node-incompatibility/427310/2 "2019-06-27T20:21:08Z")

</div>

OK - I have fixed it, and so I will share what worked for me so that others might also be able to fix it. Having reached a point where it didn’t work, and having worked out that it was a node version issue, the right thing to do is to try and get the right version of node on the pi …

To do this, I cleaned up and installed binaries of the right version direct from the [nodejs.org](http://nodejs.org) website …

#### Stop the plexamp service

```bash
sudo systemctl stop plexamp

```

#### Uninstalling node

I tried lots of things, and ended up with a bit of a mess that I had to clean up. In short I removed it using instructions that I found [here](https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04#removing-nodejs "Instructions")

This will delete any of the installs from the repos.

```bash
sudo apt-get remove nodejs

sudo apt-get purge nodejs

sudo apt-get autoremove

```

If you try any manual installs using npm or nvm then you will have more work to do …

#### Installing node from [nodejs.org](http://nodejs.org)

Open the [Nodejs website](https://nodejs.org/) in a browser.

Follow the link for Other Downloads from the front page

Towards the bottom, you will find the link for Previous Releases.

It took me to [https://nodejs.org/en/download/releases/](https://nodejs.org/en/download/releases/)

Here you can see all the different versions that you might want. We are looking for a version 9. I followed the link marked [Downloads](https://nodejs.org/download/release/v9.11.2/) for v9.11.2 which was the last v9 release.

This pulls up a big list of files. You are looking for the one that suits your pi.

Do a quick

```bash
uname -a

```

In the result it shows you what

```auto
Linux blackpi 4.19.50-v7+ #896 SMP Thu Jun 20 16:11:44 BST 2019 armv7l GNU/Linux

```

In this case armv71 - hence the file I want is named [node-v9.11.2-linux-armv7l.tar.gz](https://nodejs.org/download/release/v9.11.2/node-v9.11.2-linux-armv7l.tar.gz)

So back to your terminal session on your pi …

```bash
#download the file
wget https://nodejs.org/download/release/v9.11.2/node-v9.11.2-linux-armv7l.tar.gz

#create an install area and extract
sudo mkdir -p /usr/local/lib/nodejs
sudo tar -xJvf node-v9.11.2-linux-armv7l.tar.gz -C /usr/local/lib/nodejs

#set a couple of env variables 
VERSION=v9.11.2
DISTRO=arm71

#make the system wide links
sudo ln -s /usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin/node /usr/bin/node
sudo ln -s /usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin/npm /usr/bin/npm
sudo ln -s /usr/local/lib/nodejs/node-$VERSION-$DISTRO/bin/npx /usr/bin/npx

#check that the versions at a system level are right
node -v
npm version
npx -v

```

(based on the official instructions from the Nodejs site found from the download page entitled [Installing Node.js via binary archive on Linux](https://github.com/nodejs/help/wiki/Installation) )

This should give you a working node installation.

#### Starting plexamp again

```bash
sudo systemctl start plexamp

#Now check whether your plexamp is working
sudo systemctl status plexamp -n 50

```

If you still have an error, check you have copied over your server.json correctly. One mistake I made which took some time to spot was creating

```auto
~pi/.config/plexamp/server.json

```

when it should have been

```auto
~pi/.config/Plexamp/server.json

```

This stops it working.

Assuming you get everything right, then the player will connect to the server and sweet music will come out of the headphone socket.

One more tip …

Adjust the volume in alsamixer to increase the volume

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [June 27, 2019, 11:11pm UTC](https://forums.plex.tv/t/plexamp-for-raspberry-pi-node-incompatibility/427310/3 "2019-06-27T23:11:18Z")

</div>

This implies a node mismatch. Per [Plexamp for Raspberry Pi Release Notes](https://forums.plex.tv/t/plexamp-for-raspberry-pi-release-notes/368282) you need Node 9.

---

<div class="post-metadata">

**Author:** ![cryptout](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/cryptout/32/154035_2.png) [@cryptout](https://forums.plex.tv/u/cryptout)\
**Post date:** [September 2, 2019, 7:49pm UTC](https://forums.plex.tv/t/plexamp-for-raspberry-pi-node-incompatibility/427310/4 "2019-09-02T19:49:43Z")

</div>

> [@timheslop](#):
>
> looking

I’m getting this error when I connect with my mobile app to the plexamp pi

```sh
Jul 10 06:17:02 raspberrypi node[507]: error: [ERROR] TypeError: path must be absolute or specify root to res.sendFile
Jul 10 06:17:02 raspberrypi node[507]: at ServerResponse.L.sendFile (/home/pi/plexamp/server/server.prod.js:1:1199278)
Jul 10 06:17:02 raspberrypi node[507]: at expressApp.get (/home/pi/plexamp/server/server.prod.js:1:741187)
Jul 10 06:17:02 raspberrypi node[507]: at r.handle_request (/home/pi/plexamp/server/server.prod.js:1:1208804)
Jul 10 06:17:02 raspberrypi node[507]: at r (/home/pi/plexamp/server/server.prod.js:1:1210231)
Jul 10 06:17:02 raspberrypi node[507]: at r.dispatch (/home/pi/plexamp/server/server.prod.js:1:1210390)
Jul 10 06:17:02 raspberrypi node[507]: at r.handle_request (/home/pi/plexamp/server/server.prod.js:1:1208804)
Jul 10 06:17:02 raspberrypi node[507]: at /home/pi/plexamp/server/server.prod.js:1:1205075
Jul 10 06:17:02 raspberrypi node[507]: at s (/home/pi/plexamp/server/server.prod.js:1:1206536)
Jul 10 06:17:02 raspberrypi node[507]: at s (/home/pi/plexamp/server/server.prod.js:1:1206730)
Jul 10 06:17:02 raspberrypi node[507]: at Function.f.process_params (/home/pi/plexamp/server/server.prod.js:1:1206953)
Jul 10 06:17:02 raspberrypi node[507]: at r (/home/pi/plexamp/server/server.prod.js:1:1205019)
Jul 10 06:17:02 raspberrypi node[507]: at /home/pi/plexamp/server/server.prod.js:1:1206027
Jul 10 06:17:02 raspberrypi node[507]: at r (/home/pi/plexamp/server/server.prod.js:1:1204736)
Jul 10 06:17:02 raspberrypi node[507]: at Function.f.handle (/home/pi/plexamp/server/server.prod.js:1:1206454)
Jul 10 06:17:02 raspberrypi node[507]: at t (/home/pi/plexamp/server/server.prod.js:1:1203430)
Jul 10 06:17:02 raspberrypi node[507]: at r.handle_request (/home/pi/plexamp/server/server.prod.js:1:1208804)
Jul 10 06:17:02 raspberrypi node[507]: at /home/pi/plexamp/server/server.prod.js:1:1205447
Jul 10 06:17:02 raspberrypi node[507]: at /home/pi/plexamp/server/server.prod.js:1:1205469
Jul 10 06:17:02 raspberrypi node[507]: at Function.f.process_params (/home/pi/plexamp/server/server.prod.js:1:1206927)
Jul 10 06:17:02 raspberrypi node[507]: at r (/home/pi/plexamp/server/server.prod.js:1:1205019)
Jul 10 06:17:02 raspberrypi node[507]: at /home/pi/plexamp/server/server.prod.js:1:1206027
Jul 10 06:17:02 raspberrypi node[507]: at r (/home/pi/plexamp/server/server.prod.js:1:1204736)

```

---

<div class="post-metadata">

**Author:** ![whileseated](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@whileseated](https://forums.plex.tv/u/whileseated)\
**Post date:** [September 6, 2019, 12:58am UTC](https://forums.plex.tv/t/plexamp-for-raspberry-pi-node-incompatibility/427310/5 "2019-09-06T00:58:43Z")

</div>

> [@timheslop](#):
>
> DISTRO=arm71

Shouldn’t this be: DISTRO=linux-armv71

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 5, 2019, 12:58am UTC](https://forums.plex.tv/t/plexamp-for-raspberry-pi-node-incompatibility/427310/6 "2019-12-05T00:58:49Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
