You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 11, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 11, 2022. It is now read-only.
Unhandled Exception "Callback must be a function" #803
It did seem to have built the app. I downloaded it onto my device and it runs fine. But there was an error:
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:144:11)
at Object.rmdir (fs.js:690:14)
at Object.cleanup (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/create/zip.js:119:16)
at Object.callback (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/build/remote.js:71:21)
at Request._callback (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build-api/lib/api.js:230:26)
at Request.self.callback (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build-api/node_modules/request/main.js:122:22)
at Request.emit (events.js:182:13)
at Request. (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build-api/node_modules/request/main.js:655:16)
at Request.emit (events.js:187:15)
at IncomingMessage. (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build-api/node_modules/request/main.js:617:14)
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:137:11)
at Object.rmdir (fs.js:667:14)
at Object.cleanup (C:\nodejs\node_modules\phonegap\node_modules\phonegap-bui
ld\lib\phonegap-build\create\zip.js:119:16)
at Object.callback (C:\nodejs\node_modules\phonegap\node_modules\phonegap-bu
ild\lib\phonegap-build\create\remote.js:83:21)
at Request._callback (C:\nodejs\node_modules\phonegap\node_modules\phonegap-
build-api\lib\api.js:214:22)
at Request.self.callback (C:\nodejs\node_modules\phonegap\node_modules\phone
gap-build-api\node_modules\request\main.js:122:22)
at Request.emit (events.js:182:13)
at Request. (C:\nodejs\node_modules\phonegap\node_modules\phonega
p-build-api\node_modules\request\main.js:655:16)
at Request.emit (events.js:187:15)
at IncomingMessage. (C:\nodejs\node_modules\phonegap\node_modules
\phonegap-build-api\node_modules\request\main.js:617:14)
Same here. Checking docs, since Nodejs version 10.0.0 the callback parameter at function fs.rmdir (check API history here) is not optional, throwing a TypeError. It have built on my case too, so It seems to be just the clean-up tasks on the ending.
Found the error comes from the phonegap-build package that has its own repo and the issue is reported there too, so I suppose a maintainer should want to close this one. There is a PR to fix it waiting approval for a while, too: phonegap/node-phonegap-build#68 (just send a 👍 there)
The same problem.
I was trying to build my first hello World example.
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:136:11)
at Object.rmdir (fs.js:671:14)
at Object.cleanup (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/create/zip.js:119:16)
at Object.callback (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/create/remote.js:83:21)
at Request._callback (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build-api/lib/api.js:230:26)
at Request.self.callback (/usr/local/lib/node_modules/phonegap/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request. (/usr/local/lib/node_modules/phonegap/node_modules/request/request.js:1161:10)
at Request.emit (events.js:198:13)
at IncomingMessage. (/usr/local/lib/node_modules/phonegap/node_modules/request/request.js:1083:12)
Activity
ddugue commentedon Dec 14, 2018
Having same error
masmanidis commentedon Dec 19, 2018
Same error also, however build competed succesfully using node 8.14.1, with the following warning
(node:24320) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.
blw9 commentedon Jan 15, 2019
Same Error
Node 10.14.2
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:137:11)
at Object.rmdir (fs.js:667:14)
at Object.cleanup (C:\nodejs\node_modules\phonegap\node_modules\phonegap-bui
ld\lib\phonegap-build\create\zip.js:119:16)
at Object.callback (C:\nodejs\node_modules\phonegap\node_modules\phonegap-bu
ild\lib\phonegap-build\create\remote.js:83:21)
at Request._callback (C:\nodejs\node_modules\phonegap\node_modules\phonegap-
build-api\lib\api.js:214:22)
at Request.self.callback (C:\nodejs\node_modules\phonegap\node_modules\phone
gap-build-api\node_modules\request\main.js:122:22)
at Request.emit (events.js:182:13)
at Request. (C:\nodejs\node_modules\phonegap\node_modules\phonega
p-build-api\node_modules\request\main.js:655:16)
at Request.emit (events.js:187:15)
at IncomingMessage. (C:\nodejs\node_modules\phonegap\node_modules
\phonegap-build-api\node_modules\request\main.js:617:14)
IagoSRL commentedon Mar 5, 2019
Same here. Checking docs, since Nodejs version 10.0.0 the callback parameter at function
fs.rmdir(check API history here) is not optional, throwing a TypeError. It have built on my case too, so It seems to be just the clean-up tasks on the ending.IagoSRL commentedon Mar 5, 2019
Found the error comes from the
phonegap-buildpackage that has its own repo and the issue is reported there too, so I suppose a maintainer should want to close this one. There is a PR to fix it waiting approval for a while, too: phonegap/node-phonegap-build#68 (just send a 👍 there)JFV1960 commentedon Jun 9, 2019
The same problem.
I was trying to build my first hello World example.
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at makeCallback (fs.js:136:11)
at Object.rmdir (fs.js:671:14)
at Object.cleanup (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/create/zip.js:119:16)
at Object.callback (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build/lib/phonegap-build/create/remote.js:83:21)
at Request._callback (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build-api/lib/api.js:230:26)
at Request.self.callback (/usr/local/lib/node_modules/phonegap/node_modules/request/request.js:185:22)
at Request.emit (events.js:198:13)
at Request. (/usr/local/lib/node_modules/phonegap/node_modules/request/request.js:1161:10)
at Request.emit (events.js:198:13)
at IncomingMessage. (/usr/local/lib/node_modules/phonegap/node_modules/request/request.js:1083:12)