npm 安装串口不工作
npm install serialport not working
当我尝试安装 serialport
时,它给出了以下警告:
sudo npm install serialport --save
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):
npm install serialport --build-from-source
正如我在许多论坛上看到的那样,将 sudo
与 npm
一起使用并不是一个好习惯。
当我尝试安装 serialport
时,它给出了以下警告:
sudo npm install serialport --save
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):
npm install serialport --build-from-source
正如我在许多论坛上看到的那样,将 sudo
与 npm
一起使用并不是一个好习惯。