'How to install local package with Yarn v3?

I bashed my head against the wall trying to install a local package using Yarn v3. Here all the things I tried:

  1. Run yarn add file:../hardhat-packager
  2. Run yarn add ../hardhat-packager
  3. Manually add "hardhat-packager": "file:../hardhat-packager" in package.json
  4. Manually add "hardhat-packager": "../hardhat-packager" in package.json

All of the above resulted in Yarn getting stuck at the installation step, as shown in the screenshot below. I waited more than five minutes and I made sure that my Internet connection is fast.

I know that there is an option to link a package, but that is not quite white I want. I don't want symlinks, I want the actual package files copied over.

How can I do this? I'm using Yarn v3.2.0

Yarn Stuck



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source