package.json dependencies and Playwright configuration.
Using JavaScript/Node.js dependencies
Checkly installs dependencies from yourpackage.json and lock files. It works with npm, yarn, and pnpm.
Checkly uses npm by default.
| Available lock file | Package manager |
|---|---|
package-lock.json | npm |
pnpm-lock.json | pnpm |
yarn.lock | yarn |
Using private dependencies
Your private packages work without changes. Checkly installs them using the credentials you provide.- Add authentication configuration to your
.npmrcfile - Include the
.npmrcfile in your Checkly configuration file - 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 JFrog Artifactory
Using GitHub Packages
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
Troubleshooting
Package not found
If you see errors like404 Not Found or Package '@your-org/package' not found:
- Verify your
.npmrcfile is included inchecks.include - Check that the registry URL is correct
- Ensure your package name matches exactly (including scope)
Authentication failed
If you see401 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, orpnpm-lock.json) - Remove any conflicting lock files
- If needed, override with a custom
installCommandin 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
installCommandto install only required packages