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

Version 2.5.2 : Cannot find module 'Client' or its corresponding type declarations #794

Closed
OliverCordingl1 opened this issue Oct 10, 2023 · 3 comments · Fixed by #795
Closed

Comments

@OliverCordingl1
Copy link

OliverCordingl1 commented Oct 10, 2023

Attempting to build my project which uses the Duffel API, but getting the error:
Cannot find module 'Client' or its corresponding type declarations
multiple times in my compilation.

I went through some of the older Issues and found #372 on version 1.7, and after looking around I have a slight suspicion that relative paths have stopped being used since.

Could this be looked into please?

EDIT: Referenced the wrong issue

@OliverCordingl1
Copy link
Author

OliverCordingl1 commented Oct 10, 2023

Here are the errors I received:


242     import { Client } from 'Client';
                               ~~~~~~~~

node_modules/@duffel/api/dist/typings.d.ts:903:28 - error TS2307: Cannot find module 'Client' or its corresponding type declarations.

903     import { Client } from 'Client';
                               ~~~~~~~~

node_modules/@duffel/api/dist/typings.d.ts:952:28 - error TS2307: Cannot find module 'Client' or its corresponding type declarations.

952     import { Client } from 'Client';
                               ~~~~~~~~

node_modules/@duffel/api/dist/typings.d.ts:1226:28 - error TS2307: Cannot find module 'Client' or its corresponding type declarations.

1226     import { Client } from 'Client';
                                ~~~~~~~~

node_modules/@duffel/api/dist/typings.d.ts:1289:32 - error TS2307: Cannot find module 'types' or its corresponding type declarations.

1289     import { OrderSlice } from 'types';
                                    ~~~~~~~

node_modules/@duffel/api/dist/typings.d.ts:3768:36 - error TS2307: Cannot find module 'types' or its corresponding type declarations.

3768     import { PaginationMeta } from 'types';
                                        ~~~~~~~

node_modules/@duffel/api/dist/typings.d.ts:3922:12 - error TS1038: A 'declare' modifier cannot be used in an already ambient context.

3922     export declare class Airlines extends Resource {
                ~~~~~~~

node_modules/@duffel/api/dist/typings.d.ts:4055:28 - error TS2307: Cannot find module 'Client' or its corresponding type declarations.

4055     import { Client } from 'Client';
                                ~~~~~~~~

node_modules/@duffel/api/dist/typings.d.ts:4123:28 - error TS2307: Cannot find module 'Client' or its corresponding type declarations.

4123     import { Client } from 'Client';

@andrejak
Copy link
Contributor

Hi, thank you for reporting your issue. I had a look and it looks like we weren't fully consistent with using the relative paths. I've made a PR here: #795

Meanwhile, just checking, are you using the latest version?

@OliverCordingl1
Copy link
Author

Hi, yes I was using the latest version

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

Successfully merging a pull request may close this issue.

2 participants