MCPcopy
hub / github.com/HKUDS/DeepCode / install_frontend_deps

Function install_frontend_deps

deepcode.py:202–215  ·  view source on GitHub ↗

Install frontend dependencies if needed

(frontend_dir: Path)

Source from the content-addressed store, hash-verified

200
201
202def install_frontend_deps(frontend_dir: Path):
203 """Install frontend dependencies if needed"""
204 node_modules = frontend_dir / "node_modules"
205
206 if not node_modules.exists():
207 print("📦 Installing frontend dependencies (first run)...")
208 npm_cmd = "npm.cmd" if get_platform() == "windows" else "npm"
209 subprocess.run(
210 [npm_cmd, "install"],
211 cwd=frontend_dir,
212 check=True,
213 shell=(get_platform() == "windows"),
214 )
215 print("✅ Frontend dependencies installed")
216
217
218def start_backend(backend_dir: Path):

Callers 1

mainFunction · 0.85

Calls 2

get_platformFunction · 0.85
runMethod · 0.80

Tested by

no test coverage detected