When I run command:

sfdx force:package:version:create --package ...

I get this error:

ERROR running force:package:version:create: The package root directory is empty.

All the code is in the project? why does this happen?

1 Answer 1


I had ignored the directory in .forceignore file.

Removing the entry fixed it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .