Skip to content

Getting started

pnport 0.1.2 is available. Check installation and known limits, then prepare an installed Yarn 4 Plug'n'Play project. The project must have .pnp.cjs; pnport supports inline and split PnP data.

For a walkthrough using the published preview with Turbopack and TypeScript 7, see preview testing.

Check the project

From the directory where the subprocess should run, pnport doctor checks the selected PnP project, platform, injection artifact, and cache. pnport doctor --json provides the same checks as one machine-readable object. A non-ready report exits with status 125. Doctor readiness does not certify a particular child executable; run checks its own admission requirements.

Without --project, pnport searches upward from the current directory for the nearest .pnp.cjs. Use --project to choose another project directory or its .pnp.cjs file. Project selection does not change the child's working directory.

Run a command

After installing the stable release or an experimental preview, the invocation shape is:

pnport run -- <command> [args...]
pnport --project <installed-project> run -- <command> [args...]

The -- separates pnport options from the command and its literal arguments. Bare command names are resolved from the selected workspace's direct dependency binaries before the inherited PATH; explicit executable paths remain explicit. pnport does not wrap the command in a shell. If a dependency binary name is ambiguous, choose an explicit path.

The child inherits the working directory, environment, and standard streams. pnport diagnostics go to stderr; the child's stdout remains available for a language server or other protocol. The child's exit status is preserved when it starts successfully. See filesystem and processes and diagnostics before using a development server or watch process.

If the project has a physical node_modules directory that conflicts with the virtual dependency view, pnport reports a conflict instead of deleting or changing it. Resolve that conflict deliberately in the project before retrying.