Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails in node 10.12.0 #68

Closed
sebastianjonasson opened this issue Oct 18, 2018 · 3 comments
Closed

Build fails in node 10.12.0 #68

sebastianjonasson opened this issue Oct 18, 2018 · 3 comments

Comments

@sebastianjonasson
Copy link

OS: Ubuntu 16.04
Node: 10.12.0
Phonegap-cli: 8.0.0

Running phonegap --verbose remote build android returns the following output:

[phonegap] compressing the app...
[phonegap] uploading the app...
There was an unhandled exception within phonegap-cli! If you would like to help the PhoneGap project, please file the following details over at https://github.com/phonegap/phonegap-cli/issues
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at makeCallback (fs.js:137:11)
    at Object.rmdir (fs.js:664: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.<anonymous> (/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.<anonymous> (/usr/local/lib/node_modules/phonegap/node_modules/phonegap-build-api/node_modules/request/main.js:617:14)

I was able to make it build by updating lib/phonegap-build/create/zip.js:119 from fs.rmdir(basepath); to fs.rmdirSync(basepath);. A dummy callback (() => 1) did the trick as well.

@jgroot24
Copy link

jgroot24 commented Nov 1, 2018

Same here
OS: High Sierra 10.13.5
Node: 10.5.0
cli: 8.0.0

@gust42
Copy link

gust42 commented Nov 5, 2018

Made a quick fix in
#69

@shubhambaghel34
Copy link

I am facing this issue while running the command "PhoneGap remote build android".

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants