jeudi 29 octobre 2020

Unable to run local version of testcafe via npm link

Whenever I try to run a locally installed version of testcafe, I get the error Cannot find module '../testcafe/lib/cli'. Steps I've taken:

  1. git clone <testcafe>, then cd to testcafe
  2. npm install
  3. npm link
  4. cd to repo where my automated tests reside
  5. npm link testcafe
  6. Run testcafe <browser>

Results in

internal/modules/cjs/loader.js:796
    throw err;
    ^

Error: Cannot find module '/Users/rcooper/testcafe/lib/cli'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
    at Function.Module._load (internal/modules/cjs/loader.js:686:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10)
    at internal/main/run_main_module.js:17:11 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Is there something else I need to do, to run a local version of this library?

Aucun commentaire:

Enregistrer un commentaire