Rob*_*b C 3 testing automation automated-tests e2e-testing testcafe
每当我尝试运行本地安装的 testcafe 版本时,我都会收到错误Cannot find module '../testcafe/lib/cli'. 我采取的步骤:
git clone <testcafe>,然后 cd 到 testcafenpm installnpm linknpm link testcafetestcafe <browser>结果是
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: []
}
Run Code Online (Sandbox Code Playgroud)
我还需要做些什么来运行这个库的本地版本吗?
您需要构建 TestCafe 包。npx gulp build在npm link命令之前运行。