title: How to create Selenium Cucumber html reports with Node JS
body: <p>I want to create cucumber html reports and I am new to Node JS and I tried searching for it and I used the following </p>
  
  <pre><code>this.registerHandler('AfterFeatures', function(callback) {
          try {
              var options = {
                  theme: "bootstrap",
                  jsonFile: "/report/cucumber.json",
                  output: "/report/cucumber_report.html",
                  reportSuiteAsScenarios: true,
                  launchReport: true,
                  metadata: {
                      "App Version": "0.0.1"
                  }
              };
              reporter.generate(options);
          } catch (e) {
              console.log(e);
          }
          callback();
      });
  </code></pre>
  
  <p>But when I run my code, The cucumber feature scenarios gets executed and it finally gives me an error stating, </p>
  
  <pre><code>Unable to parse cucumberjs output into json: '/report/cucumber.json' { Error: /report/cucumber.json: ENOENT: no such file or directory, open '/report/cucumber.json'
      at Object.fs.openSync (fs.js:652:18)
      at Object.fs.readFileSync (fs.js:553:33)
      at Object.readFileSync (/Users/sarav/Documents/GitHub/automationtests/node_modules/jsonfile/index.js:67:22)
      at isValidJsonFile (/Users/sarav/Documents/GitHub/automationtests/node_modules/cucumber-html-reporter/lib/reporter.js:404:48)
      at Object.generate (/Users/sarav/Documents/GitHub/automationtests/node_modules/cucumber-html-reporter/lib/reporter.js:426:9)
      at Object.generateReport [as generate] (/Users/sarav/Documents/GitHub/automationtests/node_modules/cucumber-html-reporter/index.js:30:21)
      at /Users/sarav/Documents/GitHub/automationtests/features/support/hooks.js:49:22
      at _combinedTickCallback (internal/process/next_tick.js:131:7)
      at process._tickCallback (internal/process/next_tick.js:180:9)
    errno: -2,
    code: 'ENOENT',
    syscall: 'open',
    path: '/report/cucumber.json' }
  </code></pre>
  
  <p>Do the above code automatically generates .json and .html file or we need to manually create a .json file and converts that into a html report.</p>
  
  <p>I have worked on Java and it automatically creates the json and html reports at the end the execution.</p>
  
  <p>As this is very new I am not able to figure out whats the missing part</p>
  
  <p>Thanks</p>