You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ codeceptjs run --profile jobr --debug
(node:1889297) UnhandledPromiseRejectionWarning: Error: Could not load helper CmdHelper from module '/home/mirao/workspace/codeceptjs/node_modules/codeceptjs-cmdhelper':
Class extends value #<Object> is not a constructor or null
TypeError: Class extends value #<Object> is not a constructor or null
at Object.<anonymous> (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs-cmdhelper/index.js:11:25)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at createHelpers (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/container.js:166:27)
at Function.create (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/container.js:43:25)
at Codecept.init (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/codecept.js:56:15)
at createHelpers (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/container.js:181:13)
at Function.create (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/container.js:43:25)
at Codecept.init (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/codecept.js:56:15)
at Command.module.exports (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/command/run.js:22:12)
at Command.listener (/home/mirao/workspace/codeceptjs/node_modules/commander/index.js:315:8)
at Command.emit (events.js:314:20)
at Command.parseArgs (/home/mirao/workspace/codeceptjs/node_modules/commander/index.js:651:12)
at Command.parse (/home/mirao/workspace/codeceptjs/node_modules/commander/index.js:474:21)
at Object.<anonymous> (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/bin/codecept.js:189:9)
at Module._compile (internal/modules/cjs/loader.js:999:30)
(node:1889297) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async functionwithout a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1889297) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I did a quick check here with both versions 2.x and 3.x (on Windows OS) and didn't get the reported error. However, when I removed the line const Helper = require( 'codeceptjs' ).helper;, it also worked. So maybe it doesn't make a difference - let's remove it then.
codecept.conf.js:
Workaround/solution: (it helped me even for my custom helpers which worked in 2.6.11 and stopped working in 3.0.x):
const Helper = require('codeceptjs').helper;
fromnode_modules/codeceptjs-cmdhelper/index.js
Used SW:
The text was updated successfully, but these errors were encountered: