我正在尝试使用Jest,但每当我使用npm test时,我都会遇到错误。我试着用谷歌搜索也没找到任何解决方案
Macbook-2:JSProj abhimanyuaryan$ npm测试
> jsproj@1.0.0 test /Users/abhimanyuaryan/Desktop/JSProj
> jest
2018-05-08T12:40:57,551: [cli] Failed to open /Users/abhim
anyuaryan/Library/LaunchAgents/com.github.facebook.watchma
n.plist for write: Not a directory
Watchman: watchman --no-pretty get-sockname returned with
exit code=null, signal=SIGABRT, stderr= 2018-05-08T12:40:
57,551: [cli] Failed to open /Users/abhimanyuaryan/Library
/LaunchAgents/com.github.facebook.watchman.plist for write
: Not a directory 发布于 2021-08-16 15:14:53
检查您的Library文件夹。LaunchAgents是文件还是文件夹?在我的例子中,它是一个文件,但需要是一个文件夹。当我删除该文件并创建一个同名的文件夹时,Jest测试开始工作
https://stackoverflow.com/questions/50228034
复制相似问题