Repository navigation
5. Errors
hyeongi-park edited this page Jul 27, 2026
·
1 revision
ChessBoard-Web.js has an error system designed to inform you when you use the API incorrectly.
Every alert has a unique code associated with it and you can control how the errors are presented with the showErrors config option.
-
Error Text: The first argument to
Chessboard()cannot be an empty string. -
Description: The first argument to the
Chessboard()constructor should be the id of a DOM element or a reference to a single DOM element.
-
Error Text: The first argument to
Chessboard()must be an ID or a single DOM node. -
Description: The first argument to the
Chessboard()constructor should be the id of a DOM element or a reference to a single DOM element.
- Error Text: Unable to find a valid version of jQuery. Please include jQuery 1.8.3 or higher on the page.
- Description: Chessboard requires jQuery version 1.8.3 or higher.
- Error Text: Invalid value passed to highlightSquare().e4
-
Description: Squares must be a string in the form of
'e2','b8', etc.
- Error Text: Invalid value passed to removeHighlight().e4
-
Description: Squares must be a string in the form of
'e2','b8', etc.
- Error Text: Invalid values passed to addArrow().{from:e2, to:e4}
-
Description: Squares must be a string in the form of
'e2','b8', etc.
- Error Text: Invalid values passed to removeArrow().{from:e2, to:e4}
-
Description: Squares must be a string in the form of
'e2','b8', etc.
- Error Text: Invalid values passed to addMark().{square:square, type:type}
-
Description: Squares must be a string in the form of
'e2','b8', etc. / Type must be'circle','cross', or 'square'
- Error Text: Invalid values passed to removeMark().e4
-
Description: Squares must be a string in the form of
'e2','b8', etc.
- Error Text: Invalid value passed to addNagBadge().e4
-
Description: Squares must be a string in the form of
'e2','b8', etc.
- Error Text: Invalid image source passed to addNagBadge().brilliant
-
Description: Squares must be a string in the form of
'brilliant','mistake', etc.
- Error Text: Invalid value passed to removeNagBadge().e4
-
Description: Squares must be a string in the form of
'e2','b8', etc.
- Error Text: Invalid move passed to the move method.
-
Description: Moves must be a string in the form of
'e2-e4','b8-c6', etc.
- Error Text: Invalid value passed to the orientation method.
-
Description: The first argument to the orientation method must be
'white','black', or'flip'.
- Error Text: Invalid value passed to the position method.
-
Description: Position must be either
'start', a valid FEN String, or a valid Position Object.
- Error Text: Invalid value passed to config.position
-
Description: Position must either be
'start', a valid FEN String, or a Position Object.
- Error Text: Unable to build image source for config.pieceTheme.
- Description: This is an internal Chessboard error that you should never see. If you see this error please open a GitHub issue.
- Error Text: Unable to build image source for config.nagTheme.
- Description: This is also an internal Chessboard error that you should never see. If you see this error please open a GitHub issue.