目录

ohpm install Error Codes

00604001 No Matching Version

Error Message

No Match.

Symptom

No matching version is found.

Possible Causes

The package version obtained from the server does not match the version configured in oh-package.json5.

Solution

Check the available versions of the package and ensure that the specified version exists. Update the ohpm version in oh-package.json5 accordingly.

00604002 Failed to Install the HAR Package

Error Message

Install Pkg To Local Failed.

Symptom

Failed to install the local HAR package.

Possible Causes

Solution

00604003 Failed to Install the Local HSP

Error Message

Install Local Hsp Failed.

Symptom

Failed to install the local HSP.

Possible Causes

Solution

Generate a new TGZ package using DevEco Studio and compare it to identify missing information in the local HSP.

00604004 HSP File Not Found

Error Message

Not Found Hsp File By Registry Tgz.

Symptom

The .hsp file is not found.

Possible Causes

The .hsp file cannot be found in the HSP.

Solution

Check the HSP and ensure that the .hsp file is included.

00604005 Invalid Dependency Package Name

Error Message

Invalid CliInput Pkg.

Symptom

The dependency package name is invalid.

Possible Causes

The dependency package name cannot be retrieved from the central or private repository.

Solution

Search for the package name in the central or private repository to ensure it is correct.

00604006 Inconsistent Package Names in Dependencies

Error Message

Inconsistent Dep Names.

Symptom

The package names declared in the dependencies do not match the actual package names.

Possible Causes

With useNormalizedOHMUrl (in the project-level build-profile.json5 file) or enforce_dependency_key (in the .ohpmrc file) set to true, ohpm checks whether the names of the configured local dependencies match their corresponding package names. A mismatch results in command execution failure.

Solution

Check the dependency list and ensure that the package name in each dependency matches the actual package name.

00604007 Empty Mandatory Field

Error Message

Field IS Empty Error.

Symptom

A mandatory field is empty.

Possible Causes

A mandatory field in oh-package.json5 is not set.

Solution

Check the mandatory fields in oh-package.json5 and ensure that they contain valid values.

00604008 Latest Dependency Version Not Found

Error Message

Internal Program Error.

Symptom

The latest dependency version is not found.

Possible Causes

With multiple available dependency versions, ohpm fails to identify the latest version.

Solution

Check the package dependencies to ensure that there are no conflicts or incompatibilities. For details, see Dependency Version Conflicts of a Module.

00608002 File Does Not Exist

Error Message

File Not Found.

Symptom

The file does not exist.

Possible Causes

The oh-package.json5 file does not exist in the directory.

Solution

Ensure that the oh-package.json5 file exists in the directory.

00611002 Failed to Execute the Hook Command

Error Message

Hook Fail.

Symptom

Failed to execute the hook command.

Possible Causes

The hook command returned a non-zero exit code, or the configured command is invalid or unavailable. For example, if oh-package.json5 contains "hooks": { "postInstall": "echo 'Installation complete' && exit 1" }, exit 1 causes ohpm install to treat the hook as failed.

Solution

Ensure that the hooks command is correct.

00633001 Target Path Does Not Exist

Error Message

Target Path UnExist Error.

Symptom

The path specified in the command does not exist.

Possible Causes

The --target_path option is used, but the specified path does not exist or is incorrect.

Solution

Check the command line to ensure that the target path exists and is correct. For details, see target_path.

00622020 Parameter File Not Found

Error Message

Option Specified Parameter File Not Found.

Symptom

The parameter file pointed to by the path specified in parameterFile does not exist.

Possible Causes

The path specified by parameterFile does not exist or points to a nonexistent file.

Solution

Ensure that the path configured in parameterFile is correct and points to an existing file.

00638002 Invalid Package Name

Error Message

Invalid Group Option.

Symptom

The package name is invalid.

Possible Causes

The package name does not start with a lowercase letter (a to z), exceeds 36 characters in length, or contains characters other than lowercase letters (a to z), digits (0 to 9), hyphens (-), and underscores (_).

Solution

Check the package name and ensure it meets the requirements.