I have a server app written using the Nest.js framework with TypeScript.
When creating an instance of the MwsApi like the docs state, I am getting the following error in runtime:
[Nest] 63902 - 09/07/2020, 8:46:42 PM [ExceptionHandler] amazon_mws_1.default is not a constructor +62ms
This is my code:
import { Injectable } from '@nestjs/common';
import MwsApi from 'amazon-mws';
@Injectable()
export class MwsService {
private api: MwsApi;
constructor() {
this.api = new MwsApi();
this.api.setApiKey('xxx', 'xxx');
}
}
And this is the JS compiled/transpiled code:
const common_1 = require("@nestjs/common");
const amazon_mws_1 = require("amazon-mws");
let MwsService = class MwsService {
constructor() {
this.api = new amazon_mws_1.default();
this.api.setApiKey('xxx', 'xxx');
}
}
Hello :)
I have a server app written using the Nest.js framework with TypeScript.
When creating an instance of the MwsApi like the docs state, I am getting the following error in runtime:
[Nest] 63902 - 09/07/2020, 8:46:42 PM [ExceptionHandler] amazon_mws_1.default is not a constructor +62ms
This is my code:
And this is the JS compiled/transpiled code:
What could be the issue?
Thanks!