#36834·deno

deno x npm:pagefind seemingly fails silently (doesn't spawn child process?)

Author: oleCreated Sep 14, 2026Updated Sep 16, 2026
  • Deno version: 2.9.6
  • Node.js version: 26.8.2
  • Environment: macOS 27.0

On my system, this command prints nothing (except that Deno asks to install the package if it isn't cached):

deno x npm:[email protected] --version

But Deno exits with exit code 0 (success).

npx executes the pagefind executable and prints its version (as expected):

npx run pagefind 1.5.2
pagefind 1.5.2

Is this to be expected or a bug?

More info

Looking at the Pagefind package https://www.npmjs.com/package/pagefind/v/1.5.2:

  • Pagefind's package.json specifies a .cjs file under "bin":

     "bin": "lib/runner/bin.cjs",
    
  • The pagefind NPM module is a wrapper for a platform-native binary written in Rust.

  • The lib/runner/bin.cjs file determines the path for the platform-native binary and uses Nodes child_process.spawnSync API to execute it.

  • I can tell that deno x does execute the bin.cjs file by passing --verbose to Pagefind (the bin.cjs script recognizes the --verbose flag and prints some debug logs):

    deno x npm:[email protected] --version --verbose
    

    Output:

    pagefind npm wrapper: Running the executable at /Users/xyz/Library/Caches/deno/deno_x_cache/[email protected]/node_modules/.deno/@[email protected]/node_modules/@pagefind/darwin-arm64/bin/pagefind_extended
    pagefind npm wrapper: Process exited with status 0
    

    (You'll find these messages in the lib/runner/bin.cjs source code)

  • The place where it fails seems to be the spawning of the child process (at path /Users/xyz/Library/Caches/deno/deno_x_cache/[email protected]/node_modules/.deno/@[email protected]/node_modules/@pagefind/darwin-arm64/bin/pagefind_extended in my example, see logging above). It looks like deno x never spawns this child process (thus there's no output).

  • I also tried running deno x with --allow-run or --allow-all and various other permission combinations, but always got the same result.