Hi, I keep getting the error
Error: Cannot find module ‘nightmare’
I have installed the dependency globally. but the test.js fails when the test needs it.
test.js
var Nightmare = require('nightmare');
circle.yml
machine:
node:
version: 5.1.0
dependencies:
pre:
- npm install -g nightmare
test:
pre:
- node acceptancetest/test.js
...
console:
$node acceptancetest/test.js
module.js:340
throw err;
^
Error: Cannot find module 'nightmare'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:289:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/home/ubuntu/projectexchange/acceptancetest/test.js:1:79)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Function.Module.runMain (module.js:457:10) node acceptancetest/test.js returned exit code 1
regards Rune