In my case, i placed the action directory (which contained my action file) under the src directory, which gave me the error. I changed the action directory's location to my packages root folder (alongside the CMakeLists.txt, include directory, package.xml and src directory) and it compiled just fine.