2013-08-28 57 views
6

Tôi đang cố gắng cài đặt Zookeeper 3.4.5 trên Windows 7 bằng cách sử dụng npm 1.3.9. Khi tôi nhập'gyp' được đệ trình với mã thoát: 1 khi cố gắng cài đặt zookeeper trên cửa sổ bằng cách sử dụng npm

NPM cài đặt Zookeeper

tôi nhận được

File "C:\Program Files\npm-1.3.9\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\MSVSProject.py", line 181, in AddFileConfig 
raise ValueError('AddFileConfig: file "%s" not in project.' % path) 
ValueError: AddFileConfig: file "." not in project. 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (C:\Program Files\npm-1.3.9\node_modules\npm\node_modules\node-gyp\lib\configure.js:424:16) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:789:12) 
gyp ERR! System Windows_NT 6.1.7601 
gyp ERR! command "node" "C:\\Program Files\\npm-1.3.9\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" 
gyp ERR! cwd C:\Program Files\Zookeeper-3.4.5\node_modules\zookeeper 
gyp ERR! node -v v0.10.17 
gyp ERR! node-gyp -v v0.10.9 
gyp ERR! not ok 
npm ERR! weird error 1 
npm ERR! not ok code 0 
+0

Cùng một vấn đề nhưng giải pháp chấp nhận không giúp tôi – Reeebuuk

Trả lời

2

Vì đây đã là một vấn đề lớn và khó chịu, mà tôi đã giải quyết trong nhiều (cách không thường trực) khác nhau, cuối cùng tôi tìm thấy câu trả lời ở đây:

Error installing node-gyp on ubuntu

vì bạn đang sử Windows, hãy thử sử dụng một phiên bản trước của Python (đối với tôi nó đã sử dụng 2.6) cho Các cửa sổ.

1

Hãy thử điều này node-gyp installation. Nó làm việc cho tôi.

Đã đủ:

npm install --global --production windows-build-tools