Skip to content

Commit f3cd199

Browse files
authored
fix: compile ts hangs when puya-ts is detected but not installed in the project (#628)
1 parent d7fdc12 commit f3cd199

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/algokit/core/compilers/typescript.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ def _find_project_puyats_command(
2222
compile_command = [*npx_command, PUYATS_NPM_PACKAGE]
2323
for line in result.output.splitlines():
2424
if PUYATS_NPM_PACKAGE in line:
25+
if "UNMET DEPENDENCY" in line:
26+
raise ModuleNotFoundError(
27+
f"{PUYATS_NPM_PACKAGE} was detected in the project, but is not installed."
28+
)
2529
if version is not None:
2630
installed_version = extract_semantic_version(line)
2731
if version == installed_version:

src/algokit/core/typed_client_generation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ def find_project_generate_command(
284284
generate_command = [*npx_command, TYPESCRIPT_NPM_PACKAGE]
285285
for line in result.output.splitlines():
286286
if TYPESCRIPT_NPM_PACKAGE in line:
287+
if "UNMET DEPENDENCY" in line:
288+
raise ModuleNotFoundError(
289+
f"{TYPESCRIPT_NPM_PACKAGE} was detected in the project, but is not installed."
290+
)
287291
if version is not None:
288292
installed_version = extract_semantic_version(line)
289293
if extract_semantic_version(version) == installed_version:

0 commit comments

Comments
 (0)