Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not load other components? Is it dojo.js

See original GitHub issue

Expected behavior

I followed all the guide from esri-loader document to set it up and use it in my Angular Project. At first, it worked with simple loading. However, when I tried to load more component (eg: WMSLayer, GeoJSONLayer… - because there are many kind of layers in my map) It fail to load:

  • Describe what you expected or wanted to happen. Could load and use more ESRI API Components eg: WMSLayer, GeoJSONLayer…
  • What you are trying to achieve? I tried many times to load many kind of modules of ArcGIS API including over the Internet and locally
  • Describe your environment/framework and be specific with version numbers (e.g. React 16.2, react-router 4.2, redux 3.7, node 8.3). OS: Windows 10 Pro 64 Angular: 8.3.23 npm: 6.14 node: 12.14.1 ArcGIS API: 4.14

Actual behavior

  • Describe what occurs in your code. These code worked const [Map, MapView] = await loadModules([ "esri/Map", "esri/views/MapView"]); AND const [Map, MapView, Point] = await loadModules([ "esri/Map", "esri/views/MapView", "esri/geometry/Point"]);

But these ones didn’t: const [Map, MapView, GeoJSONLayer] = await loadModules([ "esri/Map", "esri/views/MapView", "esri/layers/GeoJSONLayer"]); OR const [Map, MapView, WMSLayer] = await loadModules([ "esri/Map", "esri/views/MapView", "esri/layers/WMSLayer"]);

  • Specifically, what seems to work differently than you intended?
  • Provide any error messages you see in the console. Anytime when I tried to load more than Map and MapView component, this error happens and map could be not displayed:
EsriLoader:  Error: findModules
    at contextRequire (bootstrap:356)
    at req (bootstrap:234)
    at eval (esri-loader.js:236)
    at new ZoneAwarePromise (zone.js:930)
    at requireModules (esri-loader.js:233)
    at loadModules (esri-loader.js:267)
    at GisSimpleMapService.eval (gissimplemap.service.ts:32)
    at step (tslib.js:135)
    at Object.eval [as next] (tslib.js:116)
    at eval (tslib.js:109)

The error in: dojo.js:688

Steps to reproduce the behavior

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

dzungldcommented, Mar 25, 2020

Thanks, I think my problem could be trying to install both webpack and esri-loader and forgot to remove many configurations that I found in the Internet. I will try to start with a fresh one again. Thanks

andygupcommented, Mar 25, 2020

Sounds good. I’ll go ahead and close this issue for now. If the problem reappears feel free to let us know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

New to DOJO dojo not loading - Stack Overflow
dojoConfig must come before rendering of dojo.js file. Your coding style is showing dojo <1.7. So, use djConfig instead of dojoConfig.
Read more >
The Dojo Loader — The Dojo Toolkit - Reference Guide
js and do not want to require users to load a fully-compliant AMD loader, or in the case of exports , if you...
Read more >
dojo fisheye gets becomes invisible on ice:tree load - ICEfaces
When first rendering the page, it might be fine. The first tab will appear with the Dojo component. However, after clicking any of...
Read more >
1. Toolkit Overview - Dojo: The Definitive Guide [Book] - O'Reilly
This chapter provides an overview of Dojo's architecture, takes you through installing Dojo, introduces some domain-specific jargon, runs through the ...
Read more >
Using DOJO with Apex 3.2 on Oracle XE
js from there. Problem is that when dojo.js tries to load additional files from the very same directory, it's unable to load them,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found