Error missing list of packages to add to your project is raised by yarn add command. This happens when you forget to mention a package name. The solution is to use command yarn add package_name
.
According to yarn add documentation, the valid syntaxes are –
# To install latest package yarn add package-name # To install specific package version yarn add [email protected] # To install package according to tag like latest, beta, alpha-01 yarn add [email protected]
Suppose you forgot to add package-name in the command and used like this –
yarn add
Then, it will raise error missing list of packages to add to your project.

How to install all packages in package.json?
When you were using yarn add
command without any package name then you might wished to install all packages in package.json
, just like npm install
.
To install all packages, you can use this command –
yarn install // Or simply yarn

Conclusion
The solution to the error “missing list of packages to add to your project” is to mention the package name in yarn add command like yarn add package_name
. In this article we also saw how we can install all the packages in package.json
file using yarn install
command.