关于 npm install serialport的问题

按照http://wiki.wrtnode.cc/index.p ... odejs的方法执行到npm install serialport时失败:

root@OpenWrt:~/module/node_modules# cd ..
root@OpenWrt:~/module# npm install seralport
npm ERR! Linux 3.18.29
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "seralport"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code E404

npm ERR! 404 Not Found: seralport
npm ERR! 404
npm ERR! 404 'seralport' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR! /root/module/npm-debug.log
这是为什么啊?大神帮帮忙
已邀请:

好人 - 老it男

赞同来自:

不好意思,上面的是我失误,修改报错内容如下:
 
root@OpenWrt:~/module# npm install serialport
-
> serialport@4.0.7 install /root/module/node_modules/serialport
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(404): https://github.com/EmergingTechnologyA                                                                                        dvisors/node-serialport/releases/download/4.0.7/serialport-v4.0.7-node-v14-linux                                                                                        -mipsel.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for serialport@4.0.7 and node@0.1                                                                                        2.7 (node-v14 ABI) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python2 -c import platform; print                                                                                        (platform.python_version());
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:751:12)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at maybeClose (child_process.js:1015:16)
gyp ERR! stack     at Socket.<anonymous> (child_process.js:1183:11)
gyp ERR! stack     at Socket.emit (events.js:107:17)
gyp ERR! stack     at Pipe.close (net.js:485:12)
gyp ERR! System Linux 3.18.29
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js                                                                                        " "configure" "--fallback-to-build" "--module=/root/module/node_modules/serialpo                                                                                        rt/build/Release/serialport.node" "--module_name=serialport" "--module_path=/roo                                                                                        t/module/node_modules/serialport/build/Release"
gyp ERR! cwd /root/module/node_modules/serialport
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_mo                                                                                        dules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root/modu                                                                                        le/node_modules/serialport/build/Release/serialport.node --module_name=serialpor                                                                                        t --module_path=/root/module/node_modules/serialport/build/Release' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/root/module/node_modul                                                                                        es/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_proces                                                                                        s.js:1087:5)
node-pre-gyp ERR! System Linux 3.18.29
node-pre-gyp ERR! command "node" "/root/module/node_modules/serialport/node_modu                                                                                        les/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /root/module/node_modules/serialport
node-pre-gyp ERR! node -v v0.12.7
node-pre-gyp ERR! node-pre-gyp -v v0.6.32
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js                                                                                         configure --fallback-to-build --module=/root/module/node_modules/serialport/buil                                                                                        d/Release/serialport.node --module_name=serialport --module_path=/root/module/no                                                                                        de_modules/serialport/build/Release' (1)
npm ERR! Linux 3.18.29
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "serialport"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! serialport@4.0.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@4.0.7 install script 'node-pre-gyp install --f                                                                                        allback-to-build'.
npm ERR! 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 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!     /root/module/npm-debug.log
 

要回复问题请先登录注册