Skip to content

Commit 068c65d

Browse files
authored
fix(docs-examples): pin typescript to 5.x in execute runner (#24736)
The `docs/examples/bootstrap.sh execute` step is failing CI. The example runner does an unpinned `yarn add -D typescript tsx`, and `typescript@latest` on npm is now `7.0.2` (the native port). Its package layout has no `lib/_tsc.js`, so Yarn 4's builtin compat patch fails to apply: ``` Error: typescript@patch:...npm%3A7.0.2...: ENOENT: no such file or directory, lstat '.../lib/_tsc.js' ``` Pin the install to `typescript@^5.3.3` — the same line the rest of the monorepo uses (resolves to 5.9.3) and matching the existing pin in `docs/examples/ts/bootstrap.sh`. Verified with Yarn 4.13.0: the unpinned add reproduces the `_tsc.js` error, the pinned add applies the compat patch cleanly.
1 parent 632095c commit 068c65d

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

docs/docs-developers/docs/tutorials/js_tutorials/aztecjs-getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ yarn init -y
2424
Next, add the TypeScript dependencies:
2525

2626
```sh
27-
yarn add typescript @types/node tsx
27+
yarn add "typescript@^5.3.3" @types/node tsx
2828
```
2929

3030
:::tip

docs/examples/ts/aztecjs_runner/run.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ setup_project() {
115115
[ ${#NPM_DEPS[@]} -gt 0 ] && yarn_add_with_retry "${NPM_DEPS[@]}"
116116
fi
117117

118-
yarn_add_with_retry -D typescript tsx
118+
# Pin typescript to the 5.x line used across the monorepo. An unpinned
119+
# `yarn add typescript` now resolves to the 7.x native port, whose package
120+
# layout has no lib/_tsc.js, so yarn 4's builtin compat patch fails to apply.
121+
yarn_add_with_retry -D "typescript@^5.3.3" tsx
119122

120123
# Copy tsconfig
121124
cp "$EXAMPLES_DIR/tsconfig.template.json" tsconfig.json

0 commit comments

Comments
 (0)