Harness Artifact Registry provides full support for npm packages, allowing you to host private JavaScript and TypeScript packages.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/harness/harness-cli/llms.txt
Use this file to discover all available pages before exploring further.
Overview
NPM registry features:- Standard npm registry protocol
- Automatic metadata extraction from
package.json - Scoped package support (
@org/package) - Version management and dist-tags
- Seamless integration with npm, yarn, and pnpm
Pushing npm packages
Use thehc artifact push npm command to publish packages:
How it works
The CLI automatically:- Validates the
.tgztarball format - Extracts
package.jsonfrom the tarball - Reads package name and version from
package.json - Builds the npm upload payload
- Uploads the package to the registry
Installing npm packages
After configuring your npm client, install packages as usual:Registry configuration
Configure npm to use your Harness registry:Project-level configuration
Create.npmrc in your project:
.npmrc
Scoped packages
For scoped packages (@myorg/package):
.npmrc
Using the CLI
Automate configuration with:Examples
Package.json requirements
Minimalpackage.json:
CI/CD integration
- GitHub Actions
- GitLab CI
Troubleshooting
package.json must contain 'name' and 'version'
package.json must contain 'name' and 'version'
Ensure your tarball was created correctly:
Failed to extract package.json from tarball
Failed to extract package.json from tarball
The file must be a valid gzipped tarball:
Upload failed with 4xx error
Upload failed with 4xx error
Check authentication and permissions: