title: Node.js ERROR Cannot find Module
body: <p>Hey guys I'm new to JS and Node.js and I'm having trouble setting up a webdriverio project using cucumber and PageObject. And every time I try to run a test this error happens:</p>
  
  <pre><code>ERROR: Cannot find module '../support/action/openWebsite'
  chrome
      at Function.Module._resolveFilename (module.js:469:15)
      at Function.Module._load (module.js:417:25)
      at Module.require (module.js:497:17)
      at require (internal/module.js:20:19)
      at Object.&lt;anonymous&gt; (/Users/axelbarford/Desktop/Oktana-training-webdriverio/src/steps/LoginStepDef/loginStepsDef.js:1:1)
      at Module._compile (module.js:570:32)
      at loader (/usr/local/lib/node_modules/babel-register/lib/node.js:144:5)
      at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/babel-register/lib/node.js:154:7)
      at Module.load (module.js:487:32)
      at tryModuleLoad (module.js:446:12)
  </code></pre>
  
  <p>This is the loginStepsDef.js file where the openWebSite is being called:</p>
  
  <pre><code> import openWebsite from '../support/action/openWebsite';
  import LoginPage from '../pageobject/LoginPage/LoginPage';
  
  module.exports = function given() {
      this.Given(
          /^I open salesforce login page$/,
              openWebsite
      );
  
      this.When(
          /^I set user "([^"]*)?" and password "([^"]*)?"$/, function(arg1,arg2) {
              LoginPage.open();
              LoginPage.username.setValue(arg1)
              LoginPage.password.setValue(arg2) 
          });
  
      this.And(
          /^I click the login button$/,function(){
              LoginPage.open();
              LoginPage.submit(); 
          });
  }
  </code></pre>
  
  <p>Any idea what could be happening would be great. Do you need me to show something more let me know.</p>
  
  <p><a href="https://i.stack.imgur.com/RG6y8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RG6y8.jpg" alt="Tree"></a></p>