[JS] - Changed method warning to error