-1

Heading

yarn add v1.22.18 warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/4] Resolving packages... error An unexpected error occurred: "https://registry.yarnpkg.com/@tanstack%2freact-query: Not found". info If you think this is a bug, please open a bug report with the information provided in "G:\Projects\74\doctors-portal-client\yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

  • You could try to delete your `package-lock.json` file as suggested [here](https://stackoverflow.com/questions/55624786/how-to-solve-package-json-found-to-clear-this-warning-remove-package-lock). This file is automatically generated by npm, so don't worry about breaking anything by removing it. – Nicholas Obert Jul 09 '22 at 06:54
  • @NicholasObert I don't think he cares much about the warning but rather the error of yarn not being able to find the `@tanstack/react-query` library. – Rubek Joshi Jul 11 '22 at 09:27

1 Answers1

0

As suggested by the error message, you can try to delete your package-lock.json file to get rid of the warning. As stated in the npm documentation, package-lock.json is automatically generated by npm for any operation that modifies the node_modules tree or package.json, so don't worry about breaking anything by removing this file, as it will be generated the next time you make some changes to your project.

Nicholas Obert
  • 1,235
  • 1
  • 13
  • 29