I am using this code
\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{external}
\tikzexternalize[prefix=figures/]
\usepackage[theorems,skins]{tcolorbox}
\tcbset{red eqbox/.style={enhanced,top=0.2ex, bottom=0.2ex,
left=0.1ex,right=0.1ex,
overlay={\fill[red!10] (frame.south west) to[bend left]
(frame.north west) -- (frame.north east) to[bend left]
(frame.south east) -- cycle;},
boxrule=0pt},
blue eqbox/.style={enhanced,top=0.2ex, bottom=0.2ex,
left=0.1ex,right=0.1ex,
overlay={\fill[blue!10] (frame.south west) to[bend left]
(frame.north west) -- (frame.north east) to[bend left]
(frame.south east) -- cycle;},
boxrule=0pt},
highlight math style=red eqbox}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{equation}
\tcbhighmath{\int x \,e^{-x}\, x}
\end{equation}
\end{document}
And it produces such an error:
File ended while scanning use of \tikzexternal@laTeX@collect@until@end@tikzpicture.
However, if I comment \tikzexternalize[prefix=figures/] or \tcbset{...} command, the file compiles correctly.
Note: I've created figures folder beside my .tex file.
