module: fix async resolution error within the sync findPackageJSON
#56382
+57
−8
findPackageJSON
#56382