wdio-cucumber-parallel-execution icon indicating copy to clipboard operation
wdio-cucumber-parallel-execution copied to clipboard

Getting Error: cannot find module 'node-emoji'

Open sachin-s-joshi opened this issue 4 years ago • 2 comments

With

  • wdio v7
  • cucumber v7
  • wdio.conf.ts runner

Configuration:

const sourceSpecDirectory = process.env.features;
const parallelExecutionReportDirectory = `path/to/parallelExecutionReportDirectory`;

let featureFilePath = `${sourceSpecDirectory}/*.feature`;

// If parallel execution is set to true, then create the Split the feature files
// And store then in a tmp spec directory (created inside `the source spec directory)
if (argv.parallel === 'true') {
    const tmpSpecDirectory = `${sourceSpecDirectory}/tmp`;
    cParallel.performSetup({
        sourceSpecDirectory: sourceSpecDirectory,
        tmpSpecDirectory: tmpSpecDirectory,
        cleanTmpSpecDirectory: true
    });
    featureFilePath = `${tmpSpecDirectory}/*.feature`
}

Stack Trace: Failed loading configuration file: /Users/sjosh00/PycharmProjects/wdio-mocha/wdio.conf.ts: Cannot find module 'node-emoji' Require stack:

  • /Users/sjosh00/PycharmProjects/wdio-mocha/node_modules/wdio-cucumber-parallel-execution/performSetup.js
  • /Users/sjosh00/PycharmProjects/wdio-mocha/node_modules/wdio-cucumber-parallel-execution/index.js
  • /Users/sjosh00/PycharmProjects/wdio-mocha/wdio.conf.ts
  • /Users/sjosh00/PycharmProjects/wdio-mocha/node_modules/@wdio/config/build/lib/FileSystemPathService.js
  • /Users/sjosh00/PycharmProjects/wdio-mocha/node_modules/@wdio/config/build/lib/ConfigParser.js
  • /Users/sjosh00/PycharmProjects/wdio-mocha/node_modules/@wdio/config/build/index.js
  • /Users/sjosh00/PycharmProjects/wdio-mocha/node_modules/@wdio/cli/build/launcher.js
  • /Users/sjosh00/PycharmProjects/wdio-mocha/node_modules/@wdio/cli/build/index.js
  • /Users/sjosh00/PycharmProjects/wdio-mocha/node_modules/@wdio/cli/bin/wdio.js

sachin-s-joshi avatar Jul 30 '21 15:07 sachin-s-joshi

Hello, is there any update on this here or anywhere? I got the same problem...

David-SanchezG avatar Sep 16 '21 21:09 David-SanchezG

node-emoji is referenced in performSetup.js but it's a dev dependency. The workaround is to explicitly add node-emoji as a dependency, or use an older version [email protected] which doesn't have the dependency node-emoji.

yunj avatar Sep 18 '21 21:09 yunj