Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn install | warning Pattern is trying to unpack in the same destination

Tags:

npm

yarnpkg

I am new to Yarn the package manager. I am getting below error. Could someone help me?

 D:\test\0x-starter-project-master>yarn install
 yarn install v1.12.1
 [1/4] Resolving packages...
 [2/4] Fetching packages...
 warning Pattern ["ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git"] is trying to unpack in the same destination "C:\\Users\\abc\\AppData\\Local\\Yarn\\Cache\\v3\\npm-ethereumjs-abi-0.6.5-4ea2fdfed09e8f99117d9362d17c6b01b64a2bcf\\node_modules\\ethereumjs-abi" as pattern ["[email protected]","ethereumjs-abi@^0.6.5","[email protected]"]. This could result in non-deterministic behavior, skipping.
 [---------------------------------------------------------------------------------------------------------------] 0/884
like image 966
user3289405 Avatar asked Nov 12 '18 16:11

user3289405


1 Answers

Late answer, but ... It seems yarn can have problems figuring out dependencies some times. So a workaround in this case is:

  1. run yarn why <problem_package_name_here> to find all of the dependencies on that package. So in your case that would be yarn why ethereumjs-abi - keep a note of all of these dependent packages.
  2. then yarn remove that package and all packages that are dependent on it
  3. yarn add <problem_package_name_here> first (i.e. yarn add ethereumjs-abi in your case), and finally
  4. yarn add <all> <the> <other> <packages> <you> <removed> <in> <step 2>

Now yarn should no longer be confused about dependencies etc.

like image 146
Lee H Avatar answered Oct 13 '22 05:10

Lee H