# struggling to get a 'tag input' form element with autocomplete

**URL:** <https://talk.observablehq.com/t/struggling-to-get-a-tag-input-form-element-with-autocomplete/1484>\
**Category:** Help\
**Created:** [December 10, 2018, 6:09pm UTC](https://talk.observablehq.com/t/struggling-to-get-a-tag-input-form-element-with-autocomplete/1484 "2018-12-10T18:09:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![aaronkyle](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/aaronkyle/32/8106_2.png) [@aaronkyle](https://talk.observablehq.com/u/aaronkyle)\
**Post date:** [December 11, 2018, 5:23am UTC](https://talk.observablehq.com/t/struggling-to-get-a-tag-input-form-element-with-autocomplete/1484/2 "2018-12-11T05:23:08Z")

</div>

So part of this may indeed be that I’m not getting the modules to load correctly?

I took a different tack and forked Tom’s Observable React Guide here:

> **[React Bootstrap Typeahead - Revisited / Observable](https://beta.observablehq.com/d/46a7d4477a9f2aa2)**
>
> A better way to code.

I worked through the process of trying to load in the module as:

```auto
r = require.alias({
  react: "react@16/umd/react.production.min.js",
  "react-dom": "react-dom@16/umd/react-dom.production.min.js",
  "react-bootstrap-typeahead": "react-bootstrap-typeahead@3.2.4/lib/index.js"
})

```

… but failed: I get `Typeahead = Error: invalid module` with

```auto
Typeahead = r('react-bootstrap-typeahead')

```

I see that both `react` and `react-dom` have `/umd/` in the path, so maybe I am missing something there?

Also, it is possible to load the module with Observable’s `require`:

```auto
react_bootstrap_typeahead = require('https://bundle.run/react-bootstrap-typeahead@3.2.4')

```

… but is this a different thing than loading the module as a React Component? Or should everything just play together?

Even as I try to progress by dropping in some code from the example, I get `SyntaxError: Unexpected token` for a pattern that I see throughout all of the examples.

Can anyone offer some further insights? I really appreciate your time and guidance!

* * *

**More things for me to get my head around:**

- [Debugging React Components](https://talk.observablehq.com/t/debugging-react-components/844)
- [Semiotic in Observable](https://beta.observablehq.com/@tmcw/semiotic-in-observable#req)
- [Conversation between Tom & Mike w/ Dan Abramov](https://github.com/facebook/react/issues/12928)

---

_[View the full topic](https://talk.observablehq.com/t/struggling-to-get-a-tag-input-form-element-with-autocomplete/1484)._
