2012-03-04 10 views
1

私はnodeJSが新しく、Node Package Manager(NPM)を使ってinotifyというパッケージをインストールしようとしています。NPTでInotifyをインストールする

sudo npm install inotify

そして、私は次のエラーを取得する:NPMをインストールした後

(OSXライオンに)、私はコマンドでinotifyをインストールしようとした

npm http GET https://registry.npmjs.org/inotify 
npm http 304 https://registry.npmjs.org/inotify 

> [email protected] install /usr/local/lib/node_modules/inotify 
> node-waf configure build 

Checking for program g++ or c++   : /usr/bin/g++ 
Checking for program cpp     : /usr/bin/cpp 
Checking for program ar     : /usr/bin/ar 
Checking for program ranlib    : /usr/bin/ranlib 
Checking for g++       : ok 
Checking for node path     : not found 
Checking for node prefix     : ok /usr/local/Cellar/node/0.6.6 
Checking for program node    : /usr/local/bin/node 
Checking for function inotify_init  : not found 
/usr/local/lib/node_modules/inotify/src/wscript:11: error: the configuration failed (see '/usr/local/lib/node_modules/inotify/build/config.log') 
npm ERR! error installing [email protected] 

npm ERR! [email protected] install: `node-waf configure build` 
npm ERR! `sh "-c" "node-waf configure build"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the inotify package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-waf configure build 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls inotify 
npm ERR! There is likely additional logging output above. 
npm ERR! 
npm ERR! System Darwin 11.2.0 
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "inotify" 
npm ERR! cwd /Users/username/code 
npm ERR! node -v v0.6.6 
npm ERR! npm -v 1.1.4 
npm ERR! code ELIFECYCLE 
npm ERR! message [email protected] install: `node-waf configure build` 
npm ERR! message `sh "-c" "node-waf configure build"` failed with 1 
npm ERR! errno {} 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /Users/username/code/npm-debug.log 
npm not ok 

誰かがこれで私を助けることができます

答えて

4

inotify_initが見つからないため、inotifyモジュールがビルドされません。これは、OS Xではinotifyが利用できないためです。

OS XのFSEvents APIは、同様の機能を提供しますが、全く異なるAPIです。 inotifyモジュールはこの状況では動作しません。

何をしようとしているかによって、fs.watchがあなたのニーズに合っているかもしれません。プラットフォームの相違点を抽象化しています。

  • On Linux systems, this uses inotify .
  • On BSD systems (including OS X), this uses kqueue .
  • On SunOS systems (including Solaris and SmartOS), this uses event ports.
  • On Windows systems, this feature depends on ReadDirectoryChangesW .
関連する問題