NPMをインストールしようとすると、シリアルポートをインストールしようとするとこのエラーが発生します。シリアルポートではなく、他のモジュールをうまくインストールできます。私はLinux、ノード、およびnpmに比較的慣れていないため、この問題に関するいくつかのガイダンスが必要です。NPMを使用してnode-serialportをインストールする際の問題
これはpackage.jsonに
失敗したコマンドである "CDのserialport_nativeを、ノードWAFのconfigureビルド; CPビルド/デフォルト/ serialport_native.node ../"
私はノードのバージョン0.4を持っています0.9とNPMのバージョン1.0.15とSERIALPORTバージョン0.2.8
[email protected]:~$ npm install serialport
> [email protected] install /home/administrator/node_modules/serialport
> cd serialport_native;node-waf configure build;cp build/default/serialport_native.node ../
sh: node-waf: not found
cp: cannot stat `build/default/serialport_native.node': No such file or directory
npm ERR! error installing [email protected] Error: [email protected] install: `cd serialport_native;node-waf configure build;cp build/default/serialport_native.node ../`
npm ERR! error installing [email protected] `sh "-c" "cd serialport_native;node-waf configure build;cp build/default/serialport_native.node ../"` failed with 1
npm ERR! error installing [email protected] at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/exec.js:49:20)
npm ERR! error installing [email protected] at ChildProcess.emit (events.js:67:17)
npm ERR! error installing [email protected] at ChildProcess.onexit (child_process.js:192:12)
npm ERR! [email protected] install: `cd serialport_native;node-waf configure build;cp build/default/serialport_native.node ../`
npm ERR! `sh "-c" "cd serialport_native;node-waf configure build;cp build/default/serialport_native.node ../"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
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! cd serialport_native;node-waf configure build;cp build/default/serialport_native.node ../
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!
npm ERR! System Linux 2.6.38-8-generic
npm ERR! command "node" "/usr/bin/npm" "install" "serialport"
npm ERR! cwd /home/administrator
npm ERR! node -v v0.4.9
npm ERR! npm -v 1.0.15
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/administrator/npm-debug.log
npm not ok
上記の出力をすべて追加しました。 – Ray
あなたのパスに不思議なノードwafがありません。ノードを再インストールするようアドバイスします。 nave => https://github.com/creationix/nvmを使用してインストールしてください。また、通常のユーザーとしてノードを実行します。おそらくより安全です。 – Alfred