I recently came across this workshop document on openlayers. The example provided can be accessed at the following link:
https://openlayers.org/workshop/en/basics/
.
Upon trying to run the example using the commands npm start
and npm run build
, both executed successfully. However, when attempting to access http://localhost:3000/ or http://localhost:1234/, no content is displayed. Please see the attached image for reference.
If anyone has encountered and solved this issue before, kindly share the solution with me.
package.json
{
"name": "app6",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "parcel index.html",
"build": "parcel build --public-url . index.html"
},
"author": "",
"license": "ISC",
"dependencies": {
"ol": "^6.5.0"
},
"devDependencies": {
"parcel-bundler": "^1.12.5"
}
}
image