OpusMill

Does this break on Windows?

Paste Node.js code or a package.json, or name any published npm package. It tells you which lines fail on Windows, what the error will look like, and what to write instead. Nothing to install.

Your code stays in your browser. The checker is plain JavaScript running on this page — there is no upload, no server of mine, and no request made when you type. Scanning a published package downloads that package's tarball from npm into this tab and unpacks it here, so that one does need the network — but nothing you paste ever leaves.

One check is missing here, and it is missing on purpose. The command line also catches an import whose case does not match the file on disk — require("./foo") when the file is Foo.js, which works on Windows and macOS and fails on Linux CI. That one has to read your directory to see the real spelling of a filename, and a web page cannot. Run npx github:Hackierz/winbreak over the repository for it.

downloaded from npm straight into this tab
Try one
Waiting for code

What this cannot tell you

Being straight about it, because a checker that oversells itself is worse than none:

  • It reads text, not a syntax tree. It follows a variable one hop and no further.
  • A clean result means these patterns were not found. It does not mean your code runs on Windows. Path lengths, file locking, PATH resolution and antivirus only show up when the code actually runs.
  • It cannot see intent. Code that is deliberately Linux-only — a script generating a systemd unit, say — looks identical to code that forgot about Windows.

This box checks one snippet. The command-line version walks a whole repository and exits non-zero, so it drops into CI as one line. It is free and MIT licensed, forever.