I’m struggling to get this working properly. Can anyone help me out?
I’ve been trying to install Zombie.js on my Windows 7 machine but keep running into problems. The main issue seems to be with the Contextify module which won’t install through npm on Windows systems.
From what I understand, npm has trouble with C++ modules on Windows. I want to use Zombie.js for headless browser testing but the installation keeps failing.
Here’s what I’ve tried so far:
Installed Node.js using the official installer
Got npm package manager set up
Installed Python 2.7 and Visual Studio 2010 (heard I need a C++ compiler)
Even tried installing Cygwin
When I run the installation command, everything seems to go fine until it hits the contextify dependency. Then I get a bunch of errors about missing files and permission issues.
C:\nodejs>node --version
v0.6.13
C:\nodejs>npm install zombie-browser
npm http GET https://registry.npmjs.org/zombie-browser
npm http 304 https://registry.npmjs.org/zombie-browser
npm http GET https://registry.npmjs.org/websocket
npm http GET https://registry.npmjs.org/dom-parser/0.2.10
npm http GET https://registry.npmjs.org/mime-types
npm http GET https://registry.npmjs.org/coffeescript
> [email protected] preinstall C:\nodejs\node_modules\zombie-browser\node_modules\websocket
> make
1 file(s) copied.
npm http GET https://registry.npmjs.org/contextify
> [email protected] preinstall C:\nodejs\node_modules\zombie-browser\node_modules\dom-parser\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:\nodejs\node_modules\zombie-browser\node_modules\dom-parser\node_modules\request\tests\config.conf'
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\nodejs\node.exe" "C:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "zombie-browser"
npm ERR! cwd C:\nodejs
npm ERR! node -v v0.6.13
npm ERR! npm -v 1.1.9
npm ERR! code ENOENT
What am I missing here? Do I really need to compile Node.js from source just to get this package working? Any guidance would be super helpful.
Had the exact same frustration with Zombie.js on Windows 7 a while back. The contextify issue is a real pain point because it relies on node-waf which was deprecated and replaced with node-gyp. Your Node version 0.6.13 is quite old and that’s likely contributing to the problem.
What worked for me was upgrading to Node 0.8.x or later first, then installing the Windows SDK 7.1 instead of Visual Studio 2010. The SDK includes the necessary build tools without the full Visual Studio overhead. Also make sure you’re running your command prompt as administrator when installing.
Before going through all that trouble though, you might want to consider PhantomJS as an alternative. It’s much easier to set up on Windows and provides similar headless browser capabilities without the native module compilation headaches.
I remember dealing with this exact problem back when I was setting up automated testing. The contextify module was notorious for Windows compatibility issues, especially with older Node versions like yours. The root cause is that node-waf (which contextify uses) doesn’t play well with Windows build environments. Instead of fighting with Visual Studio and SDK installations, I found success by switching to a precompiled binary approach. There are some unofficial Windows builds of contextify floating around that bypass the compilation step entirely. Another route that saved me hours of troubleshooting was using a Linux virtual machine for development. I know it sounds like overkill, but Ubuntu in VirtualBox handled all the native module compilation seamlessly. The performance hit was minimal for testing purposes and eliminated all the Windows-specific build tool conflicts. If you’re committed to getting it working natively on Windows, definitely upgrade your Node version first as RunningTiger mentioned. The 0.6.x branch had particularly poor Windows support for native modules.
honestly zombie.js on windows is just broken most of the time. i gave up after wasting 2 days on this exact error and switched to puppeteer instead. way better support and actualy works without needing to mess with visual studio nonsense. your node version is also pretty ancient which doesnt help