What does Yarn (really) mean by “warning Pattern [”debug@^4.1.1“] is trying to unpack in the same destination”

你。 提交于 2020-01-16 18:08:07

问题


I see there are other questions regarding this warning from Yarn on Stack Overflow, but I can't find the answer to what it means -- I mean, what it really means. That is, what does it mean for me and my app, and how can I correct it?

I'm trying to add debug with Yarn, i.e. yarn add debug -D and I get the warning

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.

I tried yarn remove debug followed by yarn add debug -D, but that didn't work.

Any insights and advice much appreciated!


回答1:


It means the installer usually creates the directory to install in, but in this case, it stumbled on a situation where the directory already exists. It is warning you that if it puts the files there, then the new files could co-exist with the files that were already there.

Try running:

rm -fR /Users/xyz/Library/Caches/Yarn/v4/npm-debug-4.1.1-3b72260255109c6b589cee050f1d516139664791/node_modules/debug

Then try installing again.

If that doesn't work, try running:

rm -fR /Users/xyz/Library/Caches/Yarn/v4/npm-debug-4.1.1-3b72260255109c6b589cee050f1d516139664791/node_modules

Then try installing again.



来源:https://stackoverflow.com/questions/54485533/what-does-yarn-really-mean-by-warning-pattern-debug4-1-1-is-trying-to-u

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!