ArcGIS building with gazebo, node, grunt

I am struggling with configuring apgis javascript api locally. I tried https://developers.arcgis.com/javascript/latest/guide/get-api/index.html#using-bower-for-local-builds , but did not use it. No help from sample application https://github.com/Esri/jsapi-resources.git

  • Bower installs arcgis-js-api
  • I installed the dojoConfig file
  • npm install
  • bower installation
  • grunt build => FAIL

    Error: cannot find module "src / dojo / dojo.js"

how it should work, since installed packages are not installed for min. cannot be dynamically loaded. Whiskey Tango Foxtrot. please, help.

Tried the yoman arcgis-js-app generator is still nothing good. I get the same error /sampleapp/src/dojo/dojo.js "Error (404):" Not Found "

+4
source share
2 answers

Assuming that you are working with the sample application as is (i.e. you are not modifying it yet), then it sounds like a failure to install your deck. In the section srcyou should see folders of type esriand dojo- if they are not there, the bower installation did not complete.

+1
source

You can configure Dojo as:

  var dojoConfig = {
  baseUrl: '.',
  packages: [
  {
    name: 'dgrid',
    location: 'bower_components/dgrid',
  },
  {
    name: 'dijit',
    location: 'bower_components/dijit',
  },
  {
    name: 'dojo',
    location: 'bower_components/dojo',
  },
  {
    name: 'dojox',
    location: 'bower_components/dojox',
  },
  {
    name: 'dstore',
    location: 'bower_components/dstore',
  },
  {
    name: 'esri',
    location: 'bower_components/esri',
  },
  {
    name: 'put-selector',
    location: 'bower_components/put-selector',
  },
  {
    name: 'xstyle',
    location: 'bower_components/xstyle',
  }
  ]
  };

or configure bower (in .bowerrc):

{
"directory":"src/"
}

Source: official documentation .

0
source

Source: https://habr.com/ru/post/1650788/


All Articles