Skip to main content
Use the Checkly CLI to turn your Playwright tests into globally distributed monitors. Checkly uses your existing package.json dependencies and Playwright configuration.

Using JavaScript/Node.js dependencies

Checkly installs dependencies from your package.json and lock files. It works with npm, yarn, and pnpm.
{
  "devDependencies": {
    "@faker-js/faker": "^9.7.0"
  }
}
Checkly uses npm by default.
Checkly detects your package manager from your lock file:
Available lock filePackage manager
package-lock.jsonnpm
pnpm-lock.jsonpnpm
yarn.lockyarn
For pnpm users: If you define the same dependency in both dependencies and devDependencies, use a custom installCommand in your checkly.config.ts to install all dependencies: pnpm install

Using private dependencies

Your private packages work without changes. Checkly installs them using the credentials you provide.
{
  "devDependencies": {
    "@your-org/private-package": "^2.3.0"
  }
}
To install private packages, Checkly authenticates with your package registry. You need to:
  1. Add authentication configuration to your .npmrc file
  2. Include the .npmrc file in your Checkly configuration file
  3. Store authentication tokens as environment variables in Checkly

Configuration files for private packages

All package managers (npm, yarn, pnpm) use .npmrc files to authenticate with private registries.
Store authentication tokens as Checkly environment variables. Reference them in your .npmrc file using ${VARIABLE_NAME} syntax.

Using private npm packages

# Using an environment variable (recommended)
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

# Hard-coded token (not recommended)
//registry.npmjs.org/:_authToken=npm_abc...

Using JFrog Artifactory

# Using an environment variable (recommended)
registry=https://yourcompany.jfrog.io/artifactory/api/npm/npm-local/:_authToken=${ARTIFACTORY_TOKEN}

# Hard-coded token (not recommended)
registry=https://yourcompany.jfrog.io/artifactory/api/npm/npm-local/:_authToken=abc...

Using GitHub Packages

//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
@your-org:registry=https://npm.pkg.github.com

Using yarn or pnpm with private packages

yarn and pnpm also use .npmrc for authentication (same format as npm examples above).

Include authentication files

Add your .npmrc file to the checks.include property in your checkly.config.ts. When you run npx checkly test or npx checkly deploy, the CLI bundles and uploads these files. This makes them available when Checkly runs installCommand to install your dependencies.
checkly.config.ts
export default defineConfig({
  checks: {
    playwrightConfigPath: './playwright.config.ts',
    // Include .npmrc for authentication with private registries
    // Works with npm, yarn, and pnpm
    include: ['.npmrc'],
    playwrightChecks: [
      // ...
    ]
  }
})

Troubleshooting

Package not found

If you see errors like 404 Not Found or Package '@your-org/package' not found:
  • Verify your .npmrc file is included in checks.include
  • Check that the registry URL is correct
  • Ensure your package name matches exactly (including scope)

Authentication failed

If you see 401 Unauthorized or 403 Forbidden errors:
  • Verify the environment secret is set in Checkly (check environment variables for details)
  • Ensure the variable name in your config file matches exactly (e.g., ${NPM_TOKEN})
  • Check that your token has the necessary permissions to access the package

Wrong package manager detected

If Checkly uses the wrong package manager:
  • Verify the correct lock file is present (package-lock.json, yarn.lock, or pnpm-lock.json)
  • Remove any conflicting lock files
  • If needed, override with a custom installCommand in your Playwright Check Suite configuration

Installation timeout

If package installation exceeds time limits:
  • Check for large dependencies that can be optimized
  • Consider using a custom installCommand to install only required packages