Help Center/ CodeArts Build/ User Guide (Ally Region)/ FAQs/ Using npm for Build/ enoent ENOENT: no such file or directory
Updated on 2026-01-08 GMT+08:00

enoent ENOENT: no such file or directory

Symptoms

The following error is displayed.

Cause Analysis

The project lacks key files.

In the preceding figure, error npm ERR! enoent ENOENT: no such file or directory, open '/xxx/slave1/workspace/job_780c6c75-1b09-4b25-a505-17730fd0684d_1545727710135/package.json' in line 520 indicates that the package.json file is missing.

Solution

Add missing files as indicated in the error log. For example, if the package.json file is missing, add the package.json file to the root directory of the code.