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
- Host: GitHub
- URL: https://github.com/cutenode/simple-esm-usage
- Owner: cutenode
- License: mit
- Created: 2019-04-24T21:28:29.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-09T03:48:56.000Z (over 6 years ago)
- Last Synced: 2025-02-18T13:50:02.768Z (over 1 year ago)
- Topics: esm, experimental-modules, export, import, node, nodejs, npm
- Language: JavaScript
- Size: 5.86 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
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 💖