nathanboktae / mocha-casperjs

Write CasperJS tests using Mocha
MIT License
120 stars 30 forks source link

failing when running in docker #101

Closed mmmmmrob closed 8 years ago

mmmmmrob commented 8 years ago

Hi, I'm getting a fail when trying to run mocha-casperjs in docker, though I'm not sure it's docker related.


npm info using npm@3.8.6
npm info using node@v5.11.0
npm info lifecycle myapp@0.0.0~premc: myapp@0.0.0
npm info lifecycle myapp@0.0.0~mc: myapp@0.0.0

> myapp@0.0.0 mc /app
> mocha-casperjs test/integration/google.js

I'm `fs` modules
TypeError: undefined is not a function (evaluating 'fs.exists('mocha-casperjs.opts')')

  phantomjs://code/cli.js:11 in global code
  :0 in injectJs
  phantomjs://code/bootstrap.js:435
^C```

You can see from ^C is hangs at that point.

Any ideas?
nathanboktae commented 8 years ago

What version of phantomjs are you using?

mmmmmrob commented 8 years ago
"phantomjs-prebuilt": "^2.1.7",
mmmmmrob commented 8 years ago

The problem is not docker related, it happens running locally on my mac too, not just in the docker container

mmmmmrob commented 8 years ago

This issue was down to a spurious reference to 'fs' that had crept into my packages.json through a typo.

The fs package in npm is a stopword/placeholder and causes the built-in fs package to not to be used, hence breaking.

My bad, sorry for the confusion.