Skip to content

Cannot find module 'url' #43

@racocvr

Description

@racocvr

Hi,

When I add httpie to an angular project I get the following error:

Error: node_modules/httpie/index.d.ts:1:21 - error TS2307: Cannot find module 'url' or its corresponding type declarations.

1 import { Url } from 'url'; 

As a workaround, I just removed the 'import' statement and the 'Url' references and it seems to work fine.

export function send<T = any>(method: string, uri: string | URL, opts?: Partial<Options>): Promise<Response<T>>;

declare function method<T = any>(uri: string | URL, opts?: Partial<Options>): Promise<Response<T>>;

If it really doesn't break anything, maybe this patch can be pushed to the repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions