An open API service indexing awesome lists of open source software.

https://github.com/cutenode/simple-esm-usage

Example "app" that uses an ESM module from npm within Node.js
https://github.com/cutenode/simple-esm-usage

esm experimental-modules export import node nodejs npm

Last synced: about 2 months ago
JSON representation

Example "app" that uses an ESM module from npm within Node.js

Awesome Lists containing this project

README

          

# simple-esm-usage

This repo is an example of how to use [simple-esm](https://github.com/bnb/simple-esm), a full-ES module published to npm, with Node.js without transpilation.

## How

Clone this repo:

```
git clone git@github.com:bnb/simple-esm-usage.git
```

Navigate to the directory:

```
cd simple-esm-usage
```

Install dependencies:

```
npm install
```

Run the "app":

```
node --experimental-modules app.js

# OR

npm start
```

If you get an error...

```
node -v
```

Make sure that returns something above Node.js v12.0.0. If it doesn't, install something above Node.js v12.0.0 💖