Back to Harper

Using Harper in Node.js

packages/web/src/routes/docs/harperjs/node/+page.md

2.1.0547 B
Original Source

Harper.js can run in Node.js. There is just one consideration: as described in more detailed here, we cannot use the WorkerLinter. That means we must use the LocalLinter.

Additionally, since harper.js is an ECMAScript module, it must be imported in a relatively recent version of Node.js.

Example Code

The example below can be found in the Harper monorepo.

@code(../../../../../../harper.js/examples/commonjs-simple/index.js)