0

I just downloaded the OpenLayers package but I think it returned an error or I didn't do it right. I have the snip attached. Does this mean that the OpenLayers package is installed or not?

openlayers error message

1 Answer 1

1

It's installed but it's not the right way to do it

In C:\Users\Owner, you will find a directory node_modules with a child directory named ol.

Normally, what you do is

  • create a directory with a meaningfull name for your project,
  • cd into it
  • run npm init and answer to the questions. It will create a file named package.json.
  • do npm install ol and now it's fine

Your issue is in fact unrelated to OpenLayers ol package but to the fact your are not familiar at the moment with NPM/Node.js usage. You may look at doc section Using NPM from MDN (Mozilla Developer Network)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.