前端开源项目UIRecorder录制脚本遇到的一些问题

发布时间 2024-01-02 11:53:25作者: 封狼居胥_神都

 

D:\nodejs\node_global>uirecorder init
    __  ______   ____                           __
   / / / /  _/  / __ \___  _________  _________/ /__  _____
  / / / // /   / /_/ / _ \/ ___/ __ \/ ___/ __  / _ \/ ___/
 / /_/ // /   / _, _/  __/ /__/ /_/ / /  / /_/ /  __/ /
 \____/___/  /_/ |_|\___/\___/\____/_/   \__,_/\___/_/    v3.5.3

Official Site: http://uirecorder.com
------------------------------------------------------------------

? Path扩展属性配置,除id,name,class之外 data-id,data-name,type,data-type,role,data-role,data-value
? 属性值黑名单正则
? class值黑名单正则
? 断言前隐藏
? WebDriver域名或IP 127.0.0.1
? WebDriver端口号 4444
? 需要同时测试的浏览器列表 chrome, ie 11

config.json 文件保存成功
package.json 文件创建成功
README.md 文件创建成功
screenshots 文件夹创建成功
commons 文件夹创建成功
uploadfiles 文件夹创建成功
.editorconfig 文件创建成功
.gitignore 文件创建成功
install.sh 文件创建成功
run.bat 文件创建成功
run.sh 文件创建成功
hosts 文件创建成功
.vscode/launch.json 文件创建成功

Start install project dependencies...
--------------------------------------------

× Install fail! Error: ENOENT: no such file or directory, open 'D:\nodejs\node_global\node_modules\_@types_cacheable-request@6.0.3@@types\cacheable-request\.npminstall.done'
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: ENOENT: no such file or directory, open 'D:\nodejs\node_global\node_modules\_@types_cacheable-request@6.0.3@@types\cacheable-request\.npminstall.done'] {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'open',
  path: 'D:\\nodejs\\node_global\\node_modules\\_@types_cacheable-request@6.0.3@@types\\cacheable-request\\.npminstall.done'
}
初始化 UIRecorder 工程时报错,根据以上提示可知没有对应文件路径,那么最初在我的计算机:C:\Users\Admin\Documents\uirecorder_test\node_modules\_@types_cacheable-request@6.0.3@@types下是没有cacheable-request这个文件夹的,只有cacheable-request这个文件,所以把原cacheable-request文件改个名备份一份以便以后可能需要而找不到(同级目录下文件夹和文件不能重名),创建cacheable-request文件夹且在它下面创建.npminstall.done文件(为方便大家使用,我把这个文件放到最后了,大家可以下载直接拿过去用),做好上面的操作后,执行uirecorder init,但可能会出现缺少C:\Users\Admin\Documents\uirecorder_test\node_modules\_@types_responselike@1.0.3@@types\responselike这个文件的情况,大家照着上面的步骤做即可,以此类推。