Commit 71d517e
committed
fix: graceful fallback when tree-sitter-typescript not installed (production fix)
The backend crashes on startup if tree-sitter-typescript is not installed
because dependency_analyzer.py is imported at app init via dependencies.py.
Fix: try/except around the import, fall back to JS parser (old behavior)
if the TS parser package isn't available. App starts regardless.
When tree-sitter-typescript IS installed, uses the proper TS/TSX parsers.
When it's NOT installed, logs a warning and uses JS parser as fallback.
This prevents Railway deploy failures from taking down the entire API.1 parent 36a235a commit 71d517e
1 file changed
Lines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | | - | |
26 | | - | |
27 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
28 | 41 | | |
29 | | - | |
| 42 | + | |
30 | 43 | | |
31 | 44 | | |
32 | 45 | | |
| |||
0 commit comments