Hola amigos aquí les traigo nuevamente un video relacionado a open layers para la implementación vía typescript, usando los imports, te invito a que veas el video para que veas como hacemos la configuración paso a paso.
Este ejemplo te ayuda a tener una idea porque te falla y muestra el error
Uncaught TypeError: Failed to resolve module specifier "ol". Relative references must start with either "/", "./", or "../".
import 'ol/ol.css';
import Map from 'ol/Map';
import OSM from 'ol/source/OSM';
import TileLayer from 'ol/layer/Tile';
import View from 'ol/View';
Uncaught TypeError: Failed to resolve module specifier "ol". Relative references must start with either "/", "./", or "../".
Error importing OpenLayers modules when run from HTML
rbush
Uncaught TypeError: Failed to resolve module specifier "rbush". Relative references must start with either "/", "./", or "../".. is occures
Please provide more context. Are you cloning OpenLayers from git, or are you using npm install ol to use OpenLayers in an application? If the former, make sure you run npm install to download all dependencies.
Nesta página do site você pode assistir ao vídeo on-line Implement Map OpenLayers Using TypeScript 2021 duração online em boa qualidade , que foi baixado pelo usuário Programa con Kike 27 Novembro 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 1,794 vezes e gostou 9 espectadores. Boa visualização!