/** * Result returned by npmInstall and npmUninstall. * The exit code from the npm subprocess; caller decides exit semantics. */ export interface NpmResult { readonly exitCode: number; } /** * Thrown when the npm binary is not found on PATH (ENOENT on spawn). * Callers map this to EC-31: print "npm not found on PATH; install Node.js with npm" and exit 1. */ export declare class NpmNotFoundError extends Error { constructor(); } /** * Run `npm install --prefix `. * * Resolves with NpmResult containing the exit code. * Rejects with NpmNotFoundError when npm is absent from PATH. */ export declare function npmInstall(args: { spec: string; prefix: string; }): Promise; /** * Run `npm uninstall --prefix `. * * Resolves with NpmResult containing the exit code. * Rejects with NpmNotFoundError when npm is absent from PATH. */ export declare function npmUninstall(args: { spec: string; prefix: string; }): Promise;