Node.js npm安装串行端口不工作

Node.js npm安装串行端口不工作,node.js,serial-port,npm,Node.js,Serial Port,Npm,当我尝试安装serialport时,它会发出以下警告: sudo npm安装serialport--保存 npm WARN EPACKAGEJSON arduino@1.0.0 No description npm WARN EPACKAGEJSON arduino@1.0.0 No repository field. npm ERR! Linux 3.13.0-61-generic npm ERR! argv "node" "/usr/local/bin/npm" "install" "ser

当我尝试安装
serialport
时,它会发出以下警告:

sudo npm安装serialport--保存

npm WARN EPACKAGEJSON arduino@1.0.0 No description
npm WARN EPACKAGEJSON arduino@1.0.0 No repository field.
npm ERR! Linux 3.13.0-61-generic
npm ERR! argv "node" "/usr/local/bin/npm" "install" "serialport" "--save"
npm ERR! node v0.12.4
npm ERR! npm  v3.3.8
npm ERR! path /home/ayushgp/learning/arduino/node_modules/serialport/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/bin/har-validator
npm ERR! code ENOENT
npm ERR! errno -2

npm ERR! enoent ENOENT, chmod '/home/ayushgp/learning/arduino/node_modules/serialport/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/bin/har-validator'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ayushgp/learning/arduino/npm-debug.log

查看此解决方案(节点版本v4.2.4):


正如我在许多论坛中所读到的,将
sudo
npm

一起使用不是一种好的做法。请查看此解决方法(节点版本v4.2.4):


正如我在许多论坛上读到的,将
sudo
npm

一起使用node.js的哪个版本不是一个好的做法?我在安装serialport时也遇到了问题,并尝试了不同版本的node.js。它在0.12.6上起作用。它们和我的问题一样吗@Augborn不完全正确,但您是否尝试过使用0.12.6?在node 4.2上遇到了相同的问题您正在使用哪个版本的node.js?我在安装serialport时也遇到了问题,并尝试了不同版本的node.js。它在0.12.6上起作用。它们和我的问题一样吗@Augborn不完全正确,但您是否尝试过使用0.12.6?在节点4.2上也存在同样的问题
npm install serialport --build-from-source