Tôi gặp sự cố, bạn có thể chỉ cho tôi đúng hướng không?Làm thế nào để cài đặt Zombie JS trên Windows 7? (trình duyệt không có node.js)
EDIT: Mô-đun này (Contextify) sẽ không cài đặt từ npm trên Windows. Xem https://github.com/brianmcd/contextify/issues/10 để biết thêm thông tin.
Điều này là do NPM không hỗ trợ C++ module trên Windows nào: https://github.com/brianmcd/contextify/issues/14#issuecomment-3577972
Nói chung tôi muốn chạy http://zombie.labnotes.org - cho Windows họ đang đề xuất:
Trên Windows bạn sẽ cần Cygwin để có quyền truy cập vào GCC, Python, v.v. Đọc để biết hướng dẫn chi tiết và khắc phục sự cố: https://github.com/joyent/node/wiki/Building-node.js-on-Cygwin-(Windows)
Vấn đề là - họ nói Cygwin mô tả là lỗi thời và đề nghị sử dụng Visual Studio ... Dù bằng cách nào tôi có cả hai và tôi đang dùng cơ hội của tôi bằng cách sử dụng trình cài đặt nodejs thay vì xây dựng nó từ đầu (lỗi dường như không liên quan đến nó). Và đây là các bước tôi đang làm:
1) Node.js cài đặt sử dụng cài đặt: http://nodejs.org/#download
2) Got NPM gói quản lý: https://github.com/isaacs/npm
3) Chấn Python 2.7, Visual Studio 2010 (như một số nguồn tin cho thấy C++ biên dịch khi cần thiết) và Cygwin ...
4) khi cài đặt không thành công ở contextify tôi đã tìm kiếm cho it
Sử dụng nhị phân được xây dựng trước chỉ cần tải về tập tin ZIP tại https://github.com/Benvie/contextify/zipball/master, giải nén nó vào thư mục node_modules của bạn, và sau đó đổi tên thư mục để "contextify"
c:\Program Files (x86)\nodejs>node --version
v0.6.13
c:\Program Files (x86)\nodejs>npm install zombie
npm http GET https://registry.npmjs.org/zombie
npm http 304 https://registry.npmjs.org/zombie
npm http GET https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/jsdom/0.2.10
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/jsdom/0.2.10
npm http 304 https://registry.npmjs.org/coffee-script
> [email protected] preinstall c:\Program Files (x86)\nodejs\node_modules\zombie\node_mo
dules\ws
> make
1 file(s) copied.
1 file(s) copied.
npm http GET https://registry.npmjs.org/commander/0.5.0
npm http GET https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander/0.5.0
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/htmlparser
npm http GET https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/cssom
> [email protected] preinstall c:\Program Files (x86)\nodejs\node_modules\zombie\
node_modules\jsdom\node_modules\contextify
> node-waf clean || (exit 0); node-waf configure build
node-waf was unexpected at this time.
npm ERR! Error: ENOENT, chmod 'c:\Program Files (x86)\nodejs\node_modules\zombie
\node_modules\jsdom\node_modules\request\tests\squid.conf'
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "c:\\Program Files (x86)\\nodejs\\\\node.exe" "c:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "zombie"
npm ERR! cwd c:\Program Files (x86)\nodejs
npm ERR! node -v v0.6.13
npm ERR! npm -v 1.1.9
npm ERR! path c:\Program Files (x86)\nodejs\node_modules\zombie\node_modules\jsd
om\node_modules\request\tests\squid.conf
npm ERR! fstream_path c:\Program Files (x86)\nodejs\node_modules\zombie\node_mod
ules\jsdom\node_modules\request\tests\squid.conf
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! message ENOENT, chmod 'c:\Program Files (x86)\nodejs\node_modules\zombi
e\node_modules\jsdom\node_modules\request\tests\squid.conf'
npm ERR! errno {}
npm ERR! fstream_stack Object.oncomplete (c:\Program Files (x86)\nodejs\node_mod
ules\npm\node_modules\fstream\lib\writer.js:285:17)
npm ERR! Error: ENOENT, lstat 'c:\Program Files (x86)\nodejs\node_modules\zombie
\node_modules\jsdom\node_modules\htmlparser\runtests.html'
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <[email protected]>
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "c:\\Program Files (x86)\\nodejs\\\\node.exe" "c:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "zombie"
npm ERR! cwd c:\Program Files (x86)\nodejs
npm ERR! node -v v0.6.13
npm ERR! npm -v 1.1.9
npm ERR! path c:\Program Files (x86)\nodejs\node_modules\zombie\node_modules\jsd
om\node_modules\htmlparser\runtests.html
npm ERR! fstream_path c:\Program Files (x86)\nodejs\node_modules\zombie\node_mod
ules\jsdom\node_modules\htmlparser\runtests.html
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, lstat 'c:\Program Files (x86)\nodejs\node_modules\zombi
e\node_modules\jsdom\node_modules\htmlparser\runtests.html'
npm ERR! errno {}
npm ERR! fstream_stack Object.oncomplete (c:\Program Files (x86)\nodejs\node_mod
ules\npm\node_modules\fstream\lib\writer.js:204:26)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\Program Files (x86)\nodejs\npm-debug.log
npm not ok
c:\Program Files (x86)\nodejs>
Những bước làm tôi cần phải thực hiện trong để làm cho nó hoạt động?
Nếu xây dựng nodejs từ các nguồn để cài đặt một gói phần mềm được yêu cầu thì hãy nói nó ồn ào :)
Cảm ơn vì đã giúp!
gì nếu tôi cần phải hỗ trợ cookie? http://stackoverflow.com/questions/9504765/does-phantomjs-support-cookies (Tôi sẽ chạy Ubuntu sau đó) –
Nó hoạt động tốt với Cookie. Chỉ là các tập lệnh PhantomJS không thể truy cập cookie. tức là Bất kỳ trang web nào bạn mở trong PhantomJS sẽ hoạt động tốt với cookie, không phải là các tập lệnh PhantomJS của bạn. –
Được rồi, sẽ thử. Tôi đã lo lắng rằng tôi thậm chí không thể chấp nhận một cookie: http://code.google.com/p/phantomjs/issues/detail?id=91 Cảm ơn bạn đã trợ giúp! –