Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module 'url' #43

Open
racocvr opened this issue Feb 19, 2024 · 0 comments
Open

Cannot find module 'url' #43

racocvr opened this issue Feb 19, 2024 · 0 comments

Comments

@racocvr
Copy link

racocvr commented Feb 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant