简体   繁体   English

Ava js不执行测试

[英]Ava js not executing tests

so I have an issue with ava >=3.0, with 2.4.0 all my tests are executing fine, I have a ts project a compile to js and execute all js test files.所以我对 ava >=3.0 有一个问题,在 2.4.0 中我所有的测试都执行得很好,我有一个 ts 项目编译为 js 并执行所有 js 测试文件。 When migrating to 3.0 (or 3.8) I have tried both, I keep getting this error...迁移到 3.0(或 3.8)时,我都尝试过,但我不断收到此错误...


  ✖ Internal error
  Error: EEXIST: file already exists, mkdir '/Users/rage/repos/*****/****-api/node_modules/.cache/ava'
  Error: EEXIST: file already exists, mkdir '/Users/rage/repos/*****/****-api/node_modules/.cache/ava'

If the cache file (node_modules/node_modules/.cache/ava) do not exists I get the following error...如果缓存文件 (node_modules/node_modules/.cache/ava) 不存在,我会收到以下错误...

✖ Couldn’t find any files to test

  ✖ Internal error
  Error: ENOENT: no such file or directory, mkdir '/Users/rage/repos/*****/****-api/node_modules/.cache/ava'
  Error: ENOENT: no such file or directory, mkdir '/Users/rage/repos/*****/****-api/node_modules/.cache/ava'

So not sure if there is a step I'm missing所以不确定是否有我遗漏的步骤

What Node.js version are you using?您使用的是什么 Node.js 版本? AVA requires at least Node.js 10.18. AVA 至少需要 Node.js 10.18。 It might be that on older versions the mkdir function behaves differently.可能是在旧版本上mkdir function 的行为不同。

In my case, I upgraded Node.js version from 10.0.0 to 12.18.1 , then able to fix this Ava Internal Error issue.就我而言,我将Node.js版本从10.0.0升级到12.18.1 ,然后能够修复这个Ava 内部错误问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM