0

I'm having troubles with Zombie.js and Behat. I'm trying to install it locally to the project (as we're trying not to depend on global packages) but I keep getting Error: Cannot find module 'zombie/node_modules/tough-cookie' when I run Behat.

Here's my behat.yml

default:
  extensions:
    MvLabs\Zf2Extension\Zf2Extension: ~
    Behat\MinkExtension:
      base_url: 'http://localhost'
      sessions:
        default:
          zombie:
            node_modules_path: ./node_modules/

And my package.json

{
  "devDependencies": {
    "zombie": "^4.2.1"
  }
}
Christopher Francisco
  • 15,672
  • 28
  • 94
  • 206

1 Answers1

1

requiring the dev-master version of the mink-zombie-driver package fixes this problem.

composer require --dev "behat/mink-zombie-driver dev-master"
Tr0nYx
  • 11
  • 3
  • I fixed it by installing zombie as a global package. But I don't like globals. Does this work with local zombie installation? – Christopher Francisco Oct 06 '16 at 14:33
  • I tested it today, and it work´s fine. Until my Webpages needs > 5s to respond. Then the behat scenario will fail because you can´t set a zombie timeout in behat.yml. There is a [github PR](https://github.com/minkphp/MinkZombieDriver/pull/154), which will fix this, but not merged till now – Tr0nYx Oct 06 '16 at 17:37