I have found some posts describing the steps for setting this up but when I follow them I receive an error: cannot find module 'cucumber'. I have cucumber and protractor and protractor-cucumber installed global and can execute them individually but not when trying to execute Protractor with a framework of cucumber.
The config file I am using is as follows:
var env = require('./environment.js');
// A small suite to make sure the cucumber framework works.
exports.config = {
seleniumAddress: env.seleniumAddress,
framework: 'cucumber',
// Spec patterns are relative to this directory.
specs: [
'../app/modules/auth/html/cucumber/*.feature'
],
capabilities: env.capabilities,
baseUrl: env.baseUrl,
cucumberOpts: {
require: '../app/modules/auth/html/cucumber/stepDefinitions.js',
tags: '@dev',
format: 'summary'
}
};
Any suggestions what I can try in order to resolve the issue?
stacktrace: Using the selenium server at http://localhost:4444/wd/hub [launcher] Running 1 instances of WebDriver [launcher] Error: Error: Cannot find module 'cucumber' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.exports.run (/Users/lbrown/node_modules/protractor/lib/frameworks/cucumber.js:13:18) at /Users/lbrown/node_modules/protractor/lib/runner.js:293:35 at _fulfilled (/Users/lbrown/node_modules/protractor/node_modules/q/q.js:797:54) at self.promiseDispatch.done (/Users/lbrown/node_modules/protractor/node_modules/q/q.js:826:30) at Promise.promise.promiseDispatch (/Users/lbrown/node_modules/protractor/node_modules/q/q.js:759:13) at /Users/lbrown/node_modules/protractor/node_modules/q/q.js:573:44 [launcher] Process exited with error code 100