Skip to content

Cannot build a history version of TypeScript #42682

@Kingwl

Description

@Kingwl

Bug Report

🔎 Search Terms

infra, build

🕗 Version & Regression Information

  • I was unable to test this on prior versions because it's infra issues.

💻 Code

I have checkout to a branch (#29228), and try to build a local package. with @xiaoxiangmoe .
But it's failed, Although It's passed the CI when the previous commit has been push.

  • I have run npx gulp clean
  • And then run git reset --hard and git clean -dfx
  • And then run yarn
  • And then run npx gulp local
scripts/request-pr-review.ts:45:37 - error TS2339: Property 'createReviewRequest' does not exist on type '{ checkIfMerged: { (params?: (RequestParameters & Pick<{ owner: string; repo: string; pull_number: number; }, "owner" | "repo" | "pull_number">) | undefined): Promise<...>; defaults: <O extends RequestParameters = RequestParameters>(newDefaults: O) => RequestInterface<...>; endpoint: EndpointInterface<...>; }; ... 2...'.

45     const response = await gh.pulls.createReviewRequest({
                                       ~~~~~~~~~~~~~~~~~~~
Found 1 error.

After mark these code as comments.

src/compiler/debug.ts:332:20 - error TS2584: Cannot find name 'console'. Do you need to change your target library? 
Try changing the `lib` compiler option to include 'dom'.

332             return console.log(formatControlFlowGraph(flowNode));
         
...

src/compiler/perfLogger.ts:33:21 - error TS2591: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.

33         etwModule = require("@microsoft/typescript-etw");
                       ~~~~~~~

src/compiler/resolutionCache.ts:709:97 - error TS2339: Property 'endsWith' does not exist on type 'Path'.

709                 changedInAutoTypeReferenced = changedInAutoTypeReferenced || containingFilePath.endsWith(inferredTypesContainingFile);
                                                                                                    ~~~~~~~~        

src/compiler/sys.ts:1120:38 - error TS2307: Cannot find module 'fs' or its corresponding type declarations.

1120             const _fs: typeof import("fs") = require("fs");
                                          ~~~~
...

Found 11 errors.

I'm not sure why but I think It's better to keep all the branch/commit always useable.

Thanks!

🙁 Actual behavior

Build failed.

🙂 Expected behavior

Build passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions