Wait till packages install successfully before writing to component.json