# How do I run an Electron app on HarmonyOS? > Use the ohos_electron_hap template to package an Electron app as a HarmonyOS HAP: requirements, project structure, where to put your app, building, signing, installing and known limitations. Source: https://ohosify.com/en/blog/electron-harmonyos-app Published: 2026-10-02 Verified: 2026-10-02 (OpenHarmony 6.1.1 Release, API 24) Author: Ohosify **Short answer:** Clone the [ohos_electron_hap](https://github.com/ohosvscode/ohos_electron_hap) template, open it in DevEco Studio, copy your compiled Electron app into `web_engine/src/main/resources/resfile/resources/app/`, configure signing, build the HAP, and install it with `hdc app install`. ## What is ohos_electron_hap? It is a template project that packages Electron applications as HarmonyOS HAP files. The README describes a complete toolchain with support for floating windows, system permissions and multi-window coordination. It does not state which Electron version it is based on, so check the repository before you depend on a specific one. ## What do you need first? | Requirement | Version (from the README) | |---|---| | DevEco Studio | 4.0 or later | | HarmonyOS SDK | API level 10 or later | | Node.js | 16.x or later | | hdc | For device install and debugging | See [How to install DevEco Studio](/en/blog/install-deveco-studio) and the [hdc command guide](/en/blog/hdc-command-guide). ## What is in the project? ```text AppScope/ application configuration chromium/ Chromium module electron/ main Electron module web_engine/ web engine component hvigor/ build tool configuration build-profile.json5, hvigorfile.ts, oh-package.json5 ``` ## How do I add my app? Build your Electron app as usual, then put the compiled output in: ```text web_engine/src/main/resources/resfile/resources/app/ ``` ## How do I build, sign and install? 1. Open the project in DevEco Studio. 2. Configure signing. A device needs a signed package, which requires a Huawei developer certificate configured in DevEco Studio. Do this before rebuilding. 3. Choose **Build > Build Hap(s)**. The unsigned output is at `electron/build/default/outputs/default/electron-default-unsigned.hap`. 4. Install the signed package: ```bash hdc app install ``` ## What HarmonyOS-specific features exist? - Floating windows: create a window with `type: 'floatWindow'`. - System permission requests through `systemPreferences`. - Platform detection: `process.platform === 'ohos'`. ## What are the limitations? - C++ Node addons must be recompiled for HarmonyOS. - Third-party binary files may need HarmonyOS versions. For CLI tools, see how to cross-compile and package them as HNP. - Some ACL permissions may need to be commented out temporarily, according to the README. ## Next steps - [Your first ArkTS app](/en/blog/first-arkts-app) - [Flutter apps for HarmonyOS](/en/blog/flutter-harmonyos-app) - [React Native apps for HarmonyOS](/en/blog/react-native-harmonyos-app) - [OpenHarmony vs HarmonyOS](/en/blog/openharmony-vs-harmonyos)