CodeceptJS: Could not load helper Mochawesome from module './helper/Mochawesome' error msg

I’ve received this error trying to run mochawesome reporter (odeceptjs run --reporter mochawesome) capture. I’m using VSCode as IDE. I followed reports guide from CodeceptJS site, so my codecept.json looks like this:

{
  "output": "./output",
  "helpers": {
    "Mochawesome": {
      "uniqueScreenshotNames": "true"
    },
    "WebDriverIO": {
      "url": "",
      "browser": "chrome",
      "windowSize": "maximize",
      "restart": true,
      "smartWait": 15000
    }
  },
  "include": {
    "I": "./steps_file.js",
    "basePage": "./base/BasePage.js"
  },
  "mocha": {
    "reporterOptions": {
      "reportDir": "output"
    }
  },
  "bootstrap": false,
  "teardown": null,
  "hooks": [],
  "tests": "./test/DashBoardTest.js",
  "timeout": 10000,
  "name": ""
}

Why did I receive that message above? Am I missing some configuration?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 19 (1 by maintainers)

Most upvoted comments

@luisgzvs @guruparanun output folders for screenshots and html report should be same. So try to modify your configs this way:

{
  "output": "./output",
  "helpers": {
    "Mochawesome": {
      "uniqueScreenshotNames": "true" // uniqueScreenshotNames in Mochawesome helper
    },
    "WebDriverIO": {
      "url": "...",
      "browser": "chrome",
      "windowSize": "maximize",
      "restart": true,
      "smartWait": 15000, 
      "uniqueScreenshotNames": "true" // uniqueScreenshotNames in selenium helper
    }
  },
  "include": {
    "I": "./steps_file.js",
    // other pages
  },
  "mocha": {
    "reporterOptions": {
      "reportDir": "./output"
    }
  },
 // other options
}