每当我尝试运行本地安装版本的testcafe时,我都会得到错误Cannot find module '../testcafe/lib/cli'
。我已经采取了以下步骤:
git clone <testcafe>
,然后cd到testcafe
npm install
npm link
npm link testcafe
testcafe <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: []
}
要运行这个库的本地版本,还有什么需要做的吗?
发布于 2020-11-02 01:02:17
您需要构建TestCafe包。在npx gulp build
命令之前运行npm link
。
https://stackoverflow.com/questions/64600629
复制