It should have little to do with the configuration version number in
dependencies. Some people say that it should be changed to the following version number
but it doesn't solve the problem.
The final solution is to change the reference method of
import XYZ from 'ol/source/XYZ'; import sourceVector from 'ol/source/Vector';