I am trying to add dependency in Manifest.json file.
//manifest.json
{
"platform-version": "2.2",
"product": {
"freshdesk": {
"events": {
"onTicketCreate": {
"handler": "onTicketCreateHandler"
}
}
}
},
"dependencies": {
"nodemailer": "6.6.5"
},
"whitelisted-domains":[]
}
At fdk run, getting the following error:
*Installing dependencies...*
*uncaughtException: cb.apply is not a function*
*TypeError: cb.apply is not a function*
* at /usr/local/lib/node_modules/fdk/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18*
* at FSReqCallback.oncomplete (fs.js:169:5)*
*{"date":"Tue Feb 08 2022 06:41:47 GMT+0530 (India Standard Time)","error":{},"exception":true,"level":"error","message":"uncaughtException: cb.apply is not a function\nTypeError: cb.apply is not a function\n at /usr/local/lib/node_modules/fdk/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18\n at FSReqCallback.oncomplete (fs.js:169:5)","os":{"loadavg":[5.56298828125,4.814453125,4.58349609375],"uptime":1200434},"process":{"argv":["/usr/local/Cellar/node@12/12.22.9/bin/node","/usr/local/bin/fdk","run"],"cwd":"/Users/rusharma/Documents/projects/freshworks/custom-apps/airtel-pay-find-number-serverless-fd-ticket-view","execPath":"/usr/local/Cellar/node@12/12.22.9/bin/node","gid":20,"memoryUsage":{"arrayBuffers":1690837,"external":5934098,"heapTotal":105713664,"heapUsed":66272320,"rss":137433088},"pid":30027,"uid":501,"version":"v12.22.9"},"stack":"TypeError: cb.apply is not a function\n at /usr/local/lib/node_modules/fdk/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18\n at FSReqCallback.oncomplete (fs.js:169:5)","trace":[{"column":18,"file":"/usr/local/lib/node_modules/fdk/node_modules/npm/node_modules/graceful-fs/polyfills.js","function":null,"line":287,"method":null,"native":false},{"column":5,"file":"fs.js","function":"FSReqCallback.oncomplete","line":169,"method":"oncomplete","native":false}]}*
FDK version: 6.13.1
Node.js version: v12.22.9
Earlier the dependency adding was working. Based on my debugging the error is related to the dependency section only. Is it related to FDK version upgrade to FDK 7 ?