# Use ArcGIS for JavaScript in Observable

**URL:** https://talk.observablehq.com/t/use-arcgis-for-javascript-in-observable/3150
**Category:** Help
**Created:** [April 25, 2020, 3:26pm UTC](https://talk.observablehq.com/t/use-arcgis-for-javascript-in-observable/3150 "2020-04-25T15:26:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fnick851](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@fnick851](https://talk.observablehq.com/u/fnick851)
#### Post date: [April 25, 2020, 3:26pm UTC](https://talk.observablehq.com/t/use-arcgis-for-javascript-in-observable/3150/1 "2020-04-25T15:26:52Z")

</div>

Is there a way to use ArcGIS for JavaScript in Observable?

ArcGIS JS is using Dojo under the hood to load their packages.

I am trying to adapt this example to an Observable notebook: [https://codepen.io/noahsong/pen/PoobqKp](https://codepen.io/noahsong/pen/PoobqKp)

Instead of the global `<scrip>` tag, you can use the ‘esri-loader’ NPM package to load ESRI packages.

But it seems like the `require` function that ESRI is trying to use under the hood is conflicting with Observable’s require? Someone care to take a look and make it work?

Thanks.

---

<div class="post-metadata">

### Author: ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)
#### Post date: [April 25, 2020, 6:57pm UTC](https://talk.observablehq.com/t/use-arcgis-for-javascript-in-observable/3150/2 "2020-04-25T18:57:32Z")

</div>

Unfortunately, I don’t think this will be (directly) possible.

ArcGIS JS relies on DOJO’s AMD convention which is incompatible with [RequireJS’s AMD convention](https://requirejs.org/docs/whyamd.html). The latter is used by Observable (and implemented by [d3-require](https://github.com/d3/d3-require)), and you can’t use multiple conventions simultaneously because they compete for the _require_ and _define_ globals.

To load this in Observable, you’ll probably need to run ESRI’s code through a bundler to either turn it into a standard ES module you can dynamic import, or to make it compatible with RequireJS.

---

<div class="post-metadata">

### Author: ![fnick851](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@fnick851](https://talk.observablehq.com/u/fnick851)
#### Post date: [April 25, 2020, 7:58pm UTC](https://talk.observablehq.com/t/use-arcgis-for-javascript-in-observable/3150/3 "2020-04-25T19:58:59Z")

</div>

Thanks for the explanation Mike 🙂
