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

VSCode中运行Moralis-Server执行npm run moralis:sync命令时遭遇frpc未识别错误

Fix for frpc Not Recognized Error When Running npm run moralis:sync

Hey there, let’s get this sorted out—your error clearly points to the frpc executable not being found by Windows, which boils down to common cross-platform file naming and path gotchas.

First, let’s recap the error you’re hitting to align on the issue:

my-app@0.1.0 moralis:sync
moralis-admin-cli connect-local-devchain --chain hardhat --moralisSubdomain cxdjddn5lxdh.usemoralis.com --frpcPath ./frp/frpc
Starting connection to Hardhat
exec error: Error: Command failed: "./frp/frpc" http -s cxdjddn5lxdh.usemoralis.com:7000 -t GCqiUSu6wG -l 8545 -d cxdjddn5lxdh.usemoralis.com
'"./frp/frpc"' is not recognized as an internal or external command, operable program or batch file.

Root Cause

Windows requires executable files to have a .exe suffix, but your command references ./frp/frpc (no suffix). You also need to confirm you downloaded the Windows-specific frp build—Linux/macOS frp executables won’t work on Windows.

Step-by-Step Fixes

  • Verify frpc.exe exists in your frp folder
    Navigate to the ./frp directory in your project. You should see a file named frpc.exe (not just frpc). If it’s missing, grab the correct Windows frp build (look for the Windows-specific zip from frp’s official releases).

  • Update your package.json script to include the .exe suffix
    Open your package.json file, find the moralis:sync script, and modify the --frpcPath value to add the .exe extension:

    "scripts": {
      "moralis:sync": "moralis-admin-cli connect-local-devchain --chain hardhat --moralisSubdomain cxdjddn5lxdh.usemoralis.com --frpcPath ./frp/frpc.exe"
    }
    
  • Test the frpc command manually first (optional but helpful)
    Open Command Prompt or PowerShell, navigate to your project root, and run this command directly to confirm it works:

    ./frp/frpc.exe http -s cxdjddn5lxdh.usemoralis.com:7000 -t GCqiUSu6wG -l 8545 -d cxdjddn5lxdh.usemoralis.com
    

    If this runs without errors, your npm run moralis:sync should work too.

  • Fix path issues (if manual test fails)
    If you still get a "file not found" error, try using the full absolute path to frpc.exe (e.g., C:\Users\YourName\Projects\my-app\frp\frpc.exe) in both the manual command and package.json script.

Bonus: For WSL Users

If you’re running this in Windows Subsystem for Linux, make sure you’re using the Linux frp build (no .exe suffix) and grant executable permissions:

chmod +x ./frp/frpc

内容的提问来源于stack exchange,提问作者Abed ja'fari

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.27 19:07:30