npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-tectonic

v1.0.1

Published

Tectonic LaTeX engine for Node.js. Compiles .tex to PDF with no system TeX installation.

Readme

node-tectonic

Compile LaTeX to PDF from Node.js without installing TeX.

This wraps the Tectonic engine and ships the native binary for your platform as an npm optional dependency, the same way esbuild distributes its binaries. Tectonic itself downloads LaTeX packages on demand the first time a document uses them, so there's no TeX Live install anywhere in the picture. Downloaded packages are cached under the OS cache directory, so only the first compile needs network access.

Install

npm install node-tectonic

npm only downloads the binary package matching your OS and CPU. Installing with --omit=optional skips it; if you hit that, the error message tells you which package to install by hand.

CLI

npx tectonic --version
npx tectonic mydoc.tex

Arguments are passed straight through to the tectonic executable.

API

const { compile } = require("node-tectonic");

const result = await compile({
  tex: String.raw`
    \documentclass{article}
    \begin{document} Hello, \(E = mc^2\). \end{document}`,
  returnBuffer: true,
});
if (!result.success) throw new Error(result.stderr);
// result.pdfBuffer is the PDF
// From a file, writing doc.pdf next to it
await compile({ texFile: "./doc.tex" });

// Into a specific directory, streaming compiler output
await compile({
  texFile: "./doc.tex",
  outputDir: "./build",
  onStderr: (chunk) => process.stderr.write(chunk),
});

compile() never throws on compilation errors; check result.success and read result.stderr. It only throws for bad arguments or a missing binary.

Options: tex or texFile (exactly one), outputDir, returnBuffer, args (extra CLI flags), timeout (ms), onStdout, onStderr. Full types in index.d.ts.

Also exported: run(args, options) for raw invocations, binaryPath(), and tectonicVersion.

Supported platforms

| | x64 | arm64 | |---|---|---| | macOS | yes | yes | | Linux | yes | yes (musl, static) | | Windows | yes | no |

Development

index.js, index.d.ts      API
bin/tectonic.js           CLI shim
lib/platforms.js          platform table and version pin
lib/binary.js             binary resolution
npm/<platform>/           one publishable package per platform
scripts/fetch-binaries.js downloads release binaries into npm/*/bin
scripts/set-version.js    bumps the version across all manifests

Releasing (CI publishes on tag, needs an NPM_TOKEN repo secret):

node scripts/set-version.js 1.0.1
git commit -am "v1.0.1"
git tag v1.0.1
git push --follow-tags

The workflow publishes the platform packages before the root package, since the root's optionalDependencies have to exist on the registry first. Versions that are already published get skipped, so reruns are safe.

To ship a newer engine, bump TECTONIC_VERSION in lib/platforms.js and cut a release.

License

MIT. The platform packages contain unmodified tectonic release binaries, which are also MIT.