Skip to content

tsc throw error Cannot find name 'URL'. #401

Closed

Description

@jk2K

Description:
I want to debug this project, so I need to convert TypeScript to Javascript first, then use VS code to debug

Action version:
Specify the action version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

npm: 6.14.8

Repro steps:

git clone https://github.com/actions/setup-node
cd setup-node
npm install
tsc

Expected behavior:
tsc build successfully

Actual behavior:
got error

setup-node git:(main) ✗ node_modules/.bin/tsc
node_modules/@actions/http-client/interfaces.d.ts:29:16 - error TS2304: Cannot find name 'URL'.

29     parsedUrl: URL;
                  ~~~

Activity

  1. jk2K commented on Jan 10, 2022

    @jk2K
    ContributorAuthor

    see actions/http-client#37

    solution: remove "lib": ["es6"] from tsconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions