Mailgun 3.4.0 APIResponse failing tsc
See original GitHub issueOverview
The commit Fix merge problem. Fix eslint errors.
causes an error during Typescript compilation. The APIResponse needs to be exported to allow methods in domains.ts to use it in type hints (implicilty).
The Error
lib/domains.ts:126:3 - error TS4053: Return type of public method from exported class has or is using name 'APIResponse' from external module "C:/Users/ruane/OneDrive/dev/mailgun-js/lib/request" but cannot be named.
126 assignIp(domain: string, ip: string) {
~~~~~~~~
lib/domains.ts:130:3 - error TS4053: Return type of public method from exported class has or is using name 'APIResponse' from external module "C:/Users/ruane/OneDrive/dev/mailgun-js/lib/request" but cannot be named.
130 deleteIp(domain: string, ip: string) {
~~~~~~~~
lib/domains.ts:134:3 - error TS4053: Return type of public method from exported class has or is using name 'APIResponse' from external module "C:/Users/ruane/OneDrive/dev/mailgun-js/lib/request" but cannot be named.
134 linkIpPool(domain: string, pool_id: string) {
~~~~~~~~~~
lib/domains.ts:138:3 - error TS4053: Return type of public method from exported class has or is using name 'APIResponse' from external module "C:/Users/ruane/OneDrive/dev/mailgun-js/lib/request" but cannot be named.
138 unlinkIpPoll(domain: string, pool_id: string, ip: string) {
~~~~~~~~~~~~
What’s causing the issue?
interface APIResponse {
status: number;
body: any;
}
How to fix the issue:
export interface APIResponse {
status: number;
body: any;
}
Steps to reproduce:
- Check out 3.4.0 or master.
- Run
npm install
- Run
tsc
Workaround for those using mailgun.js as dependency:
Downgrade to Mailgun.js 3.3.2
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to check send() response for failure in v3.0 #635 - GitHub
When the Mailgun SDK gets a valid status code (AKA 200 or 201) then we hydrate the response object with the class that...
Read more >API Issues - Mailgun Help Center
There's a problem. It appears one of our services is having difficulty. Documentation. Our elegant API docs answer lots of questions.
Read more >mailgun.js - npm
A javascript sdk for Mailgun built with webpack, babel & es6. This can be used in node or in the browser*.. Latest version:...
Read more >Unable to send mail via Mailgun over api or smtp
But each time the send command (both curl and smtp) I get "Mailgun Magnificent API" response - but no mail is delivered. So...
Read more >how to send post request curl Code Example - Code Grepper
If it still fails, a git process may have crashed in this repository earlier: ... npm WARN deprecated uuid@3.4.0: Please upgrade to version...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems like the issues were resolved. Thank you.
@Vaakmeister I fixed the import in v3.5.1. Hope I resolved all compiling errors if not please let me know.