
Make: *** No rule to make target './.node-gyp/6.9.1/include/node/common.gypi', needed by 'Makefile'. Make: Entering directory '/usr/lib/node_modules/serialport/build' Gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/serialport/.node-gyp" Gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.9.1" Prebuild-install info install installing standalone, skipping download. Prebuild-install info begin Prebuild-install version 2.2. > install /Users/wizard/src/node-serialport usr/bin/serialport-term - > /usr/lib/node_modules/serialport/bin/serialport-terminal.js usr/bin/serialport-list - > /usr/lib/node_modules/serialport/bin/serialport-list.js If you're going to use sudo or root to install Node-Serialport, npm will require you to use the unsafe parameters # npm install -g serialport If the login shell is left active, you will experience hangs and or disconnects.ĭietPi also has the ability to enable the serial port in dietpi-config however, it doens't have a way to disable the login shell that we know of. You must answer No to question 1 and Yes to question 2. Would you like the serial port hardware to be enabled?.Would you like a login shell to be accessible over serial?.To enable the serial port on Raspbian, you launch raspi-config, then select Interfacing Options, then Serial. These projects use Node Serialport under the hood. Raspberry Pi Linux įollow the instructions for setting up a Raspberry pi for use with Johnny-Five and Raspi IO. To compile node-serialport with Node.js 4.x+, you will need to use g++ v4.8 or higher. If you recently upgraded the OS, it probably removed your installation of Command Line Tools, please verify before submitting a ticket. Npm rebuild serialport -build-from-sourceĮnsure that you have at a minimum the xCode Command Line Tools installed appropriate for your system configuration. # If you have a package that depends on serialport, you can ask npm to rebuild it specifically. # Will ask npm to build serialport during install time prebuildrc on your package root with the following content: To instruct prebuild to build against the correct headers, place a file named. Like Electron, NW.js also requires compilation against its own specific headers. NW.js is an app runtime based on Chromium and node.js. Add electron-rebuild to your project's package.json's install hookįor an example project, check out electron-serialport.npm install -save-dev electron-rebuild.To recompile serialport (or any native Node.js module) for Electron, you can use electron-rebuild more info at Electron's README.

When you first install serialport it will compile against the version of Node.js on your machine, not against the Node.js runtime bundled with Electron. If you require serialport as a dependency for an Electron project, you must compile it for the version of Electron your project's using. It comes with its own version of the Node.js runtime.

# If you're installing as root, you'll also need to use the -unsafe-perm flagĮlectron is a framework for creating cross-platform desktop applications. Npm install serialport -build-from-source # Then we can install serialport, forcing it to compile Sudo apk add -no-cache make gcc g++ python linux-headers udev # Add the necessary build and runtime dependencies # If you don't have node/npm already, add that first
