compatible for both Node and AMD(CMD)