什么Yarn(真的)通过“warning Pattern [”debug@^4.1.1“]试图在同一目的地解包”
我看到关于Stack Overflow上的Yarn的这个警告还有其他问题,但我找不到它意味着什么的答案 - 我的意思是,它的真正含义。也就是说,这对我和我的应用程序意味着什么,我该如何纠正它?
我正在尝试用纱线添加debug,即yarn add debug -D
,我收到了警告
warning Pattern ["debug@^4.1.1"] is trying to unpack in the same destination "/Users/xyz/Library/Caches/Yarn/v4/npm-debug-4.1.1-3b72260255109c6b589cee050f1d516139664791/node_modules/debug" as pattern ["debug@^4.1.0","debug@^4.0.1"]. This could result in non-deterministic behavior, skipping.
我尝试了yarn remove debug
,接着是yarn add debug -D
,但这没效果。
任何见解和建议非常感谢!
回答如下:这意味着安装程序通常会创建要安装的目录,但在这种情况下,它偶然发现目录已存在的情况。它警告你,如果它将文件放在那里,那么新文件可以与已经存在的文件共存。
试试跑步:
rm -fR /Users/xyz/Library/Caches/Yarn/v4/npm-debug-4.1.1-3b72260255109c6b589cee050f1d516139664791/node_modules/debug
然后再次尝试安装。
如果这不起作用,请尝试运行:
rm -fR /Users/xyz/Library/Caches/Yarn/v4/npm-debug-4.1.1-3b72260255109c6b589cee050f1d516139664791/node_modules
然后再次尝试安装。