We love our weird puzzles, us Brits
JavaScript (Node.js), 482 bytes

This is a brute-force solution, it starts at 01 and checks every neighbouring cell checking for empty cells (--) or the desired number and following the path to completion or impossibility. If the desired number exists and isn't a neighbour it shortcuts this solution. Takes a few seconds for the largest grid.

This probably isn't particularly interesting, but I thought I'd try my hand at making a solution before looking at the answers linked on Rosetta Code and I enjoyed tackling a slightly more difficult challenge!

Finds all solutions when many exist. The body is a function that accepts a two dimensional array and the footer processes the input to the desired format, and returns the result to the desired format too. Happy to provide more information (and a less golfed implementation if there's interest).



f=a=&gt;{F=(D,n,j)=&gt;[Z=[].concat(...D),z=Z.indexOf(j),z&gt;-1&amp;&amp;[x=z%w,y=z/w|0],z&gt;-1&amp;&amp;[[x-1,y-1],[x,y-1],[x+1,y-1],[x-1,y],[x+1,y],[x-1,y+1],[x,y+1],[x+1,y+1]]][n];C=q=&gt;q.map(Q=&gt;Q.slice());w=a[0][L='length'];l=F(a,0).filter(c=&gt;c!='XX')[L];R=[];r=(s,d)=&gt;{let n=`0${+s+1}`.slice(-2);N=F(d,2,n);n&gt;l?R.push(C(d)):~F(d,1,s)?(p=F(d,3,s),p.filter(P=&gt;P==N+'')[L]?r(n,C(d)):!~F(d,1,n)?p.map(I=&gt;{[x,y]=I,(x&lt;0||x&gt;w-1||y&lt;0||y&gt;d[L]-1)||d[y][x]=='--'&amp;&amp;(D=C(d),r(D[y][x]=n,D))}):0):0};r('01',a);return R}


Try it online!