# Importing addons without npm

**URL:** <https://discourse.threejs.org/t/importing-addons-without-npm/44471>\
**Category:** Questions\
**Tags:** import\
**Created:** [November 8, 2022, 8:36pm UTC](https://discourse.threejs.org/t/importing-addons-without-npm/44471 "2022-11-08T20:36:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wout](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wout/32/30921_2.png) [@wout](https://discourse.threejs.org/u/wout)\
**Post date:** [November 8, 2022, 8:36pm UTC](https://discourse.threejs.org/t/importing-addons-without-npm/44471/1 "2022-11-08T20:36:46Z")

</div>

I’m working in an environment without npm. Importing THREE works as expected with the `latest` tag:

```nohighlight
import * as THREE from 'https://unpkg.com/three@latest/build/three.module.js'

```

But importing `OrbitControls` is another story. this works:

```nohighlight
import { OrbitControls } from 'https://unpkg.com/three@0.127.0/examples/jsm/controls/OrbitControls.js'

```

But this does not:

```nohighlight
import { OrbitControls } from 'https://unpkg.com/three@latest/examples/jsm/controls/OrbitControls.js'

```

It raises the following error:

```bash
Uncaught TypeError: Failed to resolve module specifier "three". Relative references must start with either "/", "./", or "../".

```

Does anyone know why that is?

---

<div class="post-metadata">

**Author:** ![donmccurdy](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/donmccurdy/32/33209_2.png) [@donmccurdy](https://discourse.threejs.org/u/donmccurdy)\
**Post date:** [November 8, 2022, 8:41pm UTC](https://discourse.threejs.org/t/importing-addons-without-npm/44471/2 "2022-11-08T20:41:08Z")

</div>

The OrbitControls.js module contains dependencies on “three”. You’ll have to tell the browser how to resolve that import (and any others). See “Install from CDN or static hosting”, under the [Installation guide](https://threejs.org/docs/index.html#manual/en/introduction/Installation). This requires adding an Import Map as shown in the guide.

---

<div class="post-metadata">

**Author:** ![wout](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/wout/32/30921_2.png) [@wout](https://discourse.threejs.org/u/wout)\
**Post date:** [November 9, 2022, 7:50am UTC](https://discourse.threejs.org/t/importing-addons-without-npm/44471/3 "2022-11-09T07:50:19Z")

</div>

I’ve now included three and all the add-ons in the project using the importmap and it works. Thanks!
