I'm very new to azure,when i deploying simple openlayer app to azure i am facing below issue
Uncaught TypeError: Failed to resolve module specifier "ol/Map.js". Relative references must start with either "/", "./", or "../".
main.js
import Map from 'ol/Map.js';
import OSM from 'ol/source/OSM.js';
import TileLayer from 'ol/layer/Tile.js';
import View from 'ol/View.js';
const map = new Map({
layers: [
new TileLayer({
source: new OSM(),
}),
],
target: 'map',
view: new View({
center: [0, 0],
zoom: 2,
}),
});
I'm very new to azure,when i deploying simple openlayer app to azure i am facing below issue
Uncaught TypeError: Failed to resolve module specifier "ol/Map.js". Relative references must start with either "/", "./", or "../".
main.js
import Map from 'ol/Map.js';
import OSM from 'ol/source/OSM.js';
import TileLayer from 'ol/layer/Tile.js';
import View from 'ol/View.js';
const map = new Map({
layers: [
new TileLayer({
source: new OSM(),
}),
],
target: 'map',
view: new View({
center: [0, 0],
zoom: 2,
}),
});
Share
Improve this question
asked Jan 19 at 2:16
user28409312user28409312
132 bronze badges
1
- Please Provide Logs of the logstream. – Aslesha Kantamsetti Commented Jan 19 at 2:27
1 Answer
Reset to default 0I created simple OpenLayer Application by following OpenLayer documentation and deployed it to Azure App service Windows using Vs Code.
Uncaught TypeError: Failed to resolve module specifier "ol/Map.js". Relative references must start with either "/", "./", or "../".
Even I got the same Issue, to resolve the issue I ran below command to generate Production ready file
(dist) and deploy the dist
folder to Azure Web App.
npm run build
Azure Output: