We are developing a custom app in the Freshdesk and we are facing an error since yesterday.
We have configured OnTicketCreate event, registered the event in manifest.json with a callback, and written the callback in server.js. Inside the callback we have included multiple logs which are not displaying under the logs section.
Note : The logs were coming for the app in the log section until yesterday evening. after that only we are facing this issue. mentioning this to confirm that we have made all the configuration in the manifest.json correctly.
This is what I could fetch from the backend logs for your app.
{
"type": "error",
"errorSource": "APP"
"message": "error while running the server code inside the sandboxExecutor. - internal/modules/cjs/loader.js:1102\n throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);\n ^\n\nError [ERR_REQUIRE_ESM]: Must use import to load ES Module: /var/task/developer/node_modules/axios/index.js\nrequire() of ES modules is not supported.\nrequire() of /var/task/developer/node_modules/axios/index.js from /opt/framework/index.js is an ES module file as it is a .js file whose nearest parent package.json contains \"type\": \"module\" which defines all .js files in that package scope as ES modules.\nInstead rename /var/task/developer/node_modules/axios/index.js to end in .cjs, change the requiring code to use import(), or remove \"type\": \"module\" from /var/task/developer/node_modules/axios/package.json.\n\n at new NodeError (internal/errors.js:322:7)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1102:13)\n at Module.load (internal/modules/cjs/loader.js:950:32)\n at Function.Module._load (internal/modules/cjs/loader.js:790:12)\n at Module.require (internal/modules/cjs/loader.js:974:19)\n at require (internal/modules/cjs/helpers.js:101:18)\n at require (/opt/framework/index.js:134:16)\n at server.js:1:44\n at server.js:83:20\n at Script.runInContext (vm.js:144:12)"
}