webdriverio-community / wdio-html-reporter

Fork of wdio-html-format-reporter
MIT License
18 stars 27 forks source link

Log4js should be dependency instead of dev-dependency #31

Closed wrightnathan closed 4 years ago

wrightnathan commented 4 years ago

After following the steps to install the plugin on the webdriver IO site, I get the following error when running my test suite (note: full path to node_modules was truncated). I suspect that log4js should be either a dependency or peer dependency of this module. (I'm not sure if it's really required, but I'd prefer not to bring it in, if not)

Error: Cannot find module 'log4js' Require stack:

  • node_modules/@rpii/wdio-html-reporter/build/reporter.js
  • node_modules/@rpii/wdio-html-reporter/build/index.js
  • wdio.conf.js
  • node_modules/@wdio/config/build/lib/ConfigParser.js
  • node_modules/@wdio/config/build/index.js
  • node_modules/@wdio/cli/build/launcher.js
  • node_modules/@wdio/cli/build/index.js
  • node_modules/@wdio/cli/bin/wdio.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:957:15) at Function.Module._load (internal/modules/cjs/loader.js:840:27) at Module.require (internal/modules/cjs/loader.js:1019:19) at require (internal/modules/cjs/helpers.js:77:18) at Object. (node_modules/@rpii/wdio-html-reporter/src/reporter.js:10:16) at Module._compile (internal/modules/cjs/loader.js:1133:30)
rpii commented 4 years ago

This should be resolved by including log4js-api. Please check this out.

wrightnathan commented 4 years ago

I'm probably just confused, but this line of code directly requires log4js:

https://github.com/rpii/wdio-html-reporter/blob/master/src/reporter.js#L10

Is that needed if log4js-api is used?

rpii commented 4 years ago

I didnt push the changes. I have now.

Rich

On Fri, Jun 12, 2020 at 6:50 AM Nathan notifications@github.com wrote:

I'm probably just confused, but this line of code directly requires log4js:

https://github.com/rpii/wdio-html-reporter/blob/master/src/reporter.js#L10

Is that needed if log4js-api is used?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rpii/wdio-html-reporter/issues/31#issuecomment-643280436, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEP4WAXWWHXEBIWHDBLRWIW77ANCNFSM4NOZB74A .