Error to install Azure Maps Indoor Module

Nicolás Andrés Espinoza Orellana 21 Reputation points
2021-04-20T22:28:03.523+00:00

Hi Microsoft comunity,

I have a problem after the comand "npm install azure-maps-indoor". The message or response is the next:

 npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\user\package.json'  
 npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\user\package.json'  
 npm WARN user No description  
 npm WARN user No repository field.  
 npm WARN user No README data  
 npm WARN user No license field.  
      
    + azure-maps-indoor@0.1.2  
    updated 1 package and audited 68 packages in 1.818s  
      
    9 packages are looking for funding  
      run `npm fund` for details  
      
    found 0 vulnerabilities  

I'm working with the tutorial https://learn.microsoft.com/en-us/azure/azure-maps/tutorial-creator-indoor-maps and now I'm in the next step https://learn.microsoft.com/en-us/azure/azure-maps/how-to-use-indoor-module but this error doesn't look like a good news but the command generate a file named "package-lock.json" and I don't know how to work on this point. If somebody help me I'll apreciate so much.

Best regards!

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
666 questions
{count} votes

1 answer

Sort by: Most helpful
  1. rbrundritt 16,636 Reputation points Microsoft Employee
    2021-04-29T17:33:32.42+00:00

    There are two ways you can use the Azure Maps indoor module. You can pull in the NPM package like you are trying to do, this requires your project to have a project.json file (this is required when using any NPM package). You should only take this approach if using TypeScript or if you want to self host the source code. Details on creating a package.json file can be found here: https://docs.npmjs.com/creating-a-package-json-file

    If using JavaScript, you should use the CDN hosted version of the module and simply add the script tag to your app as described in these docs: https://learn.microsoft.com/en-us/azure/azure-maps/how-to-use-indoor-module

    If you are using the NPM package for TypeScript, it is often useful to use the CDN version as well in your app rather than self hosting the source code. This ensures bug fixes automatically flow into your app.

    1 person found this answer helpful.