Fix ci-ets: pin @types/node@18 for the ArkAnalyzer build#362
Merged
Conversation
ArkAnalyzer's npm install pulls the floating latest @types/node, whose new d.ts files (e.g. ffi.d.ts) use syntax that ArkAnalyzer's bundled TypeScript cannot parse, so `npm run build` fails with TS1139/TS1005 errors and the whole ci-ets job dies before any Gradle test runs. Pin a compatible @types/node major right after npm install. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the ci-ets GitHub Actions job by preventing ArkAnalyzer’s build from breaking when npm install pulls an incompatible, floating latest @types/node that its bundled TypeScript cannot parse.
Changes:
- After ArkAnalyzer’s initial
npm install, explicitly installs@types/node@18with--no-saveto ensure a compatible major is used. - Adds inline comments documenting the failure mode (TS parse errors like TS1139/TS1005) and rationale for the pin.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
…nstall A follow-up `npm install --no-save @types/node@18` re-resolves the npm tree and prunes ohos-typescript, which ArkAnalyzer's postinstall script installs with --no-save (it is absent from package.json), so the build fails with TS2307. Pin @types/node via `npm pkg set` BEFORE the single `npm install` instead: the pin then survives resolution and postinstall keeps ohos-typescript in place. Verified locally: `npm run build` produces out/src/save/serializeArkIR.js. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ArkAnalyzer's npm install pulls the floating latest @types/node, whose new d.ts files (e.g. ffi.d.ts) use syntax that ArkAnalyzer's bundled TypeScript cannot parse, so
npm run buildfails with TS1139/TS1005 errors and the whole ci-ets job dies before any Gradle test runs. Pin a compatible @types/node major right after npm install.