Using NPM Packages in Nova Extensions
NPM packages that depend on Node.js built-ins —
path, etc. — are incompatible with Nova’s runtime, even when using a module bundler.
APIs & Executables
Many NPM packages expose functionality through APIs, CLI executables (used on the command line), or both. This guide covers how to use module bundlers to import APIs exposed by packages hosted on NPM.
Based on your needs or the API dependencies of the package you’re using, however, it may be preferable to use the executable instead.
For example, even though we can’t import the jsonlint API into a Nova extension, due in part to its use of the
fs built-ins, the
jsonlint CLI included in the package can be invoked by Nova’s
If you find yourself wanting to invoke an NPM package’s executable in your Nova extension, you might consider using nova-npm-executable to help manage those dependencies.
Let’s get started!