You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用KotlinJS开发Google Chrome扩展时构建进程卡在60%的问题求助

Troubleshooting Stuck 60% Build in KotlinJS Chrome Extension Project

Hey there, sorry to hear you're hitting this roadblock while working on your KotlinJS Chrome extension. Builds getting stuck at specific progress points are usually tied to cache issues, version conflicts, or Node.js-related quirks—let's walk through actionable fixes to get you past that 60% mark:

Common Fixes to Try

  • Update Gradle & Kotlin Versions
    The sample project might rely on outdated versions with known hanging bugs. Head to your project's build.gradle.kts (or build.gradle) and upgrade to the latest stable Kotlin JS plugin and compatible Gradle version. For example:

    plugins {
        kotlin("js") version "1.9.20" // Use the latest stable Kotlin version
        id("com.google.chrome.extension") version "1.0.1" // Match with a compatible extension plugin
    }
    
  • Wipe Gradle Caches
    Corrupted cache files are a frequent culprit for stuck builds. Run these commands to clean up and restart the build without cached data:

    # For macOS/Linux
    ./gradlew clean build --no-build-cache
    
    # For Windows
    gradlew.bat clean build --no-build-cache
    
  • Disable Parallel Build Execution
    Parallel task execution can sometimes trigger deadlocks in Kotlin JS projects. Add this line to your gradle.properties file to turn it off temporarily:

    org.gradle.parallel=false
    

    Re-run the build after making this change.

  • Check Node.js Compatibility
    Kotlin JS depends on Node.js for bundling and processing. Ensure you're running a recent LTS version (v18 or v20 are recommended). Verify your current version with:

    node --version
    

    If you have multiple Node.js versions installed, use a version manager like nvm to switch to an LTS release.

  • Get Verbose Build Logs
    Run the build with verbose logging to see exactly which task is hanging at 60%. This will help pinpoint the root cause:

    ./gradlew build -info
    

    Keep an eye out for tasks like kotlinJsBrowserProductionWebpack—this is where most Kotlin JS build hangs tend to occur.

  • Audit Dependencies
    Outdated or conflicting dependencies can freeze the build process. Scan your build.gradle.kts for deprecated libraries and replace them with modern alternatives. For Chrome extension-specific code, double-check that any Kotlin bindings for Chrome APIs are up-to-date.

If none of these steps resolve the issue, sharing the specific task name from the verbose logs or key details from your screenshot would help narrow things down further.


内容的提问来源于stack exchange,提问作者chirag patel

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 08:33:02