Build error on Ubuntu 16.04 - npm install serialport


#1

I’m recieving a build error and failure to install when following the build steps in the wizkers.io documetation. It’s failing at the step when I need to install serialport.

I would like to get some help on how to resolve the build error, so I can finish the developer installation on Ubuntu 16.04.

Setup:

Ubuntu 16.04
Node.JS v6.9.4
wizkers.git is origin/master

Most Recent Commit:

commit fa398a63cc2f11705bc6bce1ced2572edce6cd3a
Author: elafargue ed@wizkers.io

udev/rules.d/ file created and udev restarted (per developer notes)

Steps:

git clone https://github.com/wizkers/wizkers.git (ok)
cd wizkers/wizkers (ok)
sudo npm install -g gulp-cli (ok)
npm install

  • fails at this step on serialport@2.0.6 install

Here’s the final part of the npm log file, showing the failure to build serialport:

npm ERR! Linux 4.4.0-59-generic
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” "install"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! serialport@2.0.6 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@2.0.6 install script ‘node-pre-gyp install --fallback-to-build’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs serialport
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/dfannin/src/ham/wizkers/wizkers/npm-debug.log

I can provide the full log file if needed.

Any ideas/suggestions on how to resolve?

Thanks in advance,

Dave


#2

Hi Dave, thanks for the report - what kind of computer are you using? RPi, laptop, other ?


#3

I will try to reproduce - you can probably use the --verbose switch on npm install to see exactly where/why the build of serialport fails, that would be useful.


#4

Dave, check out: https://github.com/EmergingTechnologyAdvisors/node-serialport#platform-support

-> You will need to play with the version of serialport (in package.json) to get one that is compatible with yoru version of Node


#5

Ok, setting the serialport version to 4.0.7 in package.json resulted in a successful build, so thats progress.

I then ran the radio/server build, and did a start_server.sh.

the server came up successfully, and I configured it for an 857d radio.

However, when I attempted to connect to the radio (clicked on “connect to 857d”), the sever crashed with the following error message:
wizkers:server:socket admin connected +14ms
** wizkers:server Updated userinfo role to admin +6ms**
** wizkers:server:socket We are switching to a new instrument ID: BF2E0FF8-9E9C-A477-996E-56EFF3BACF07 +172ms**
** wizkers:server:socket Controller command: [object Object] +0ms**
** wizkers:server:socket Controller command: [object Object] +13s**
** wizkers:server:socket Controller command: [object Object] +5s**
** wizkers:server:socket Request for a list of serial ports +10s**
** wizkers:routes:logs Retrieving Logs for Instrument ID: BF2E0FF8-9E9C-A477-996E-56EFF3BACF07 +3s**
** wizkers:server:socket Instrument close request for instrument ID BF2E0FF8-9E9C-A477-996E-56EFF3BACF07 +2s**
** wizkers:routes:instruments Deleting instrument: BF2E0FF8-9E9C-A477-996E-56EFF3BACF07 +10ms**
** wizkers:routes:settings Updating settings. +1s**
** wizkers:server:socket We are switching to a new instrument ID: BBC79F54-D665-D76B-BBB6-3BCCBBE6BAC3 +23ms**
** wizkers:server:socket Controller command: [object Object] +58ms**
** wizkers:routes:instruments Updating instrument: BBC79F54-D665-D76B-BBB6-3BCCBBE6BAC3 +2ms**
** wizkers:server:socket Request for a list of serial ports +4s**
** wizkers:routes:instruments Updating instrument: BBC79F54-D665-D76B-BBB6-3BCCBBE6BAC3 +2m**
** wizkers:server:socket Controller command: [object Object] +167ms**
** wizkers:server Open instrument request from front-end for BBC79F54-D665-D76B-BBB6-3BCCBBE6BAC3 +3s**
** wizkers:connectionmanager Instrument open request for instrument ID BBC79F54-D665-D76B-BBB6-3BCCBBE6BAC3 +1ms**
** wizkers:connectionmanager Instrument is opening +4ms**
** wizkers:output Retrieving Outputs for Instrument ID: BBC79F54-D665-D76B-BBB6-3BCCBBE6BAC3 +1ms**
** wizkers:connections:serial Opening serial device at /dev/ttyUSB2 +3ms**
/home/dfannin/src/ham/wizkers/wizkers/wizkers/node_modules/serialport/lib/serialport.js:79
** throw new TypeError(’openImmediately is now called autoOpen and is a property of options’);**
** ^**

TypeError: openImmediately is now called autoOpen and is a property of options
** at new SerialPort (/home/dfannin/src/ham/wizkers/wizkers/wizkers/node_modules/serialport/lib/serialport.js:79:11)**
** at SerialConnection.open (/home/dfannin/src/ham/wizkers/wizkers/wizkers/dist/server/connections/serial.js:64:18)**
** at /home/dfannin/src/ham/wizkers/wizkers/wizkers/dist/server/www/js/app/instruments/yaesu_817nd/driver_backend.js:399:22**
** at /home/dfannin/src/ham/wizkers/wizkers/wizkers/node_modules/pouchdb/lib/index.js:119:11**
** at _combinedTickCallback (internal/process/next_tick.js:67:7)**
** at process._tickCallback (internal/process/next_tick.js:98:9)**

so it appears that the serialport@4.0.7 interface has changed from the 2.0 version, which breaks the server.

I’ll try some other versions of serialport to see if I can get beyond this issue.

thanks again for your help,

73,

Dave KK6DF


#6

I am making progress - I’ll release an update to the Wizkers source in a couple of hours which should fix all the build issues, watch this thread!
Ed


#7

OK, just pushed the latest code to github - and tried a build on a Raspberry Pi with success.

Use the git pull command to retrieve the latest code from github, and re-run npm install. Let me know how it goes!

Ed