Failed to compile.
opened this issue · comments
Deleted user commented
./src/services/historyService.js 19:20
Module parse failed: Can not use keyword 'await' outside an async function (19:20)
You may need an appropriate loader to handle this file type.
return new Promise(function (resolve, reject) { try { var res = await axios.get(url); var data = res.data; resolve(data.map(function (history) {
Andreas DEV commented
Just simply make function async.
return new Promise(async (resolve, reject) => {...
Deleted user commented
Thanks