# Webpack error with Inputs

**URL:** <https://talk.observablehq.com/t/webpack-error-with-inputs/5190>\
**Category:** Help\
**Created:** [June 12, 2021, 9:15am UTC](https://talk.observablehq.com/t/webpack-error-with-inputs/5190 "2021-06-12T09:15:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nachocab](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/nachocab/32/2426_2.png) [@nachocab](https://talk.observablehq.com/u/nachocab)\
**Post date:** [June 12, 2021, 9:15am UTC](https://talk.observablehq.com/t/webpack-error-with-inputs/5190/1 "2021-06-12T09:15:43Z")

</div>

Back in March, I was able to use webpack with a JS embedded notebook that imported from ‘@observablehq/inputs’ but I think inputs got updated at some point and now I get this error:

> RuntimeError: Inputs is not defined

I’ve created a [toy notebook to test](https://observablehq.com/@nachocab/testing-embed). It’s just these two cells:

```auto
viewof replay = Button("Test")

import {Button} from @observablehq/inputs

```

And this is how I import the code in my project:

```auto
import { Runtime, Inspector } from '@observablehq/runtime';
import define from '@nachocab/testing-embed';

new Runtime().module(define, Inspector.into('#myDiv'));

```

I have a pretty standard webpack config:

```auto
const path = require('path');

const javascript = {
  test: /\.js$/,
  exclude: /node_modules/,
  use: {
    loader: 'babel-loader',
    options: {
      presets: [
        [
          '@babel/preset-env',
          {
            useBuiltIns: 'entry',
            corejs: '3.9',
          },
        ],
      ],
      cacheDirectory: true,
    },
  },
};

const config = {
  mode: 'production',
  entry: {
    app: './public/index.js',
  },
  output: {
    path: path.resolve(__dirname, 'public', 'dist'),
    filename: '[name].bundle.js',
  },

  module: {
    rules: [
      javascript,
    ],
  },
};

module.exports = config;

```

What could be the problem?

---

<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:** [June 12, 2021, 3:43pm UTC](https://talk.observablehq.com/t/webpack-error-with-inputs/5190/2 "2021-06-12T15:43:48Z")

</div>

Inputs was recently added to the standard library, so you probably need to update the version of the Observable Runtime that you are using locally. (The Runtime includes a copy of the Standard Library.)

Also, since Inputs is now part of the standard library, you don’t need the import in your test notebook, and you can say simply:

```auto
viewof replay = Inputs.button("Test")

```

You’ll need Version 3.5.0 or higher of the standard library.

> **[Releases · observablehq/stdlib](https://github.com/observablehq/stdlib/releases)**
>
> The Observable standard library. Contribute to observablehq/stdlib development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![nachocab](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/nachocab/32/2426_2.png) [@nachocab](https://talk.observablehq.com/u/nachocab)\
**Post date:** [June 14, 2021, 1:30pm UTC](https://talk.observablehq.com/t/webpack-error-with-inputs/5190/3 "2021-06-14T13:30:37Z")

</div>

Ah, so simple.

Thanks a lot, Mike. You saved me!
