typescriptnpmyarnpkg

yarn install: Couldn't find package "package-name" on the "npm" registry


I was trying to install two new packages in a big project with multiple sub-projects and the YARN was not able to find the packages even having the .npmrc in the root directory.


Solution

  • Using the

    yarn install --verbose

    recommended in this thread https://github.com/yarnpkg/yarn/issues/6029 I identified that copying the .npmrc to the root of sub-project could help, and this solved the problem, now the "yarn add" and "yarn install" is working properly.