Service of node js that is using “asposewordscloud”: “^18.2.1”, responds with:“Cannot read properties of undefined (reading ‘access_token’)”, I’m using credentials provided by free trial account, this is the code:
import {
WordsApi,
PutConvertDocumentRequest,
} from "asposewordscloud";
const wordsApi = new WordsApi(
Proccess.env.ASPOSE_CLIENT_ID,
Proccess.env.ASPOSE_SECRET,
);
private async docxHtml() {
try {
const inputFile = fs.readFileSync(this.file.path);
wordsApi
.putConvertDocument(
new PutConvertDocumentRequest({
document: inputFile,
format: "html",
})
)
.then((result) => {
fs.writeFileSync("output.html", result.body);
})
.catch((error) => {
console.error({error});
});
} catch (error) {
console.log({ error });
}
}