Why it is getting SyntaxError while building it doesn't throw any error

Your topic is much likely a duplicate of: SyntaxError: Unexpected token < in JSON at position 0