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

Cordovacli fail when using it with load-grunt-config plugin #32

Open
aumerhadi opened this issue May 17, 2016 · 0 comments
Open

Cordovacli fail when using it with load-grunt-config plugin #32

aumerhadi opened this issue May 17, 2016 · 0 comments

Comments

@aumerhadi
Copy link

I am getting error when tried to use cordovacli with my project.
on gruntfile.js I am using load-grunt-config plugin to break down grunt script.I create file for cordovacli (cordovacli.js) , and added the script to create mobile package.
I getting the following error when it try to execute cordova command (grunt createCordova:cordovacli)

Error Cordova does not know undefined; try cordova help for a list of all the available commands.
Warning: Use --force to continue.
Error
at callDone (C:\test\node_modules\grunt\node_modules\grunt-legacy-util\index.js:159:56)
at ChildProcess. (C:\test\node_modules\grunt\node_modules\grunt-legacy-util\index.js:198:5)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
Aborted due to warnings.`

This is my code on gruntfile.js
module.exports = function(grunt) { require('load-grunt-config')(grunt); grunt.registerTask('createCordova', ['cordovacli']); };

and this is from cordovacli.js
module.exports = { cordovacli: { options: { path: 'mobile/testApp', cli: 'cordova' }, build_ios: { options: { command: 'build', platforms: ['ios'] } } } };

Note: If I use grunt.initConfig and place the script inside gruntfile.js, cordovacli plugin will work fine. the reason I am using load-grunt-config because I have big script and many plugins and it help to organize mt script.

@aumerhadi aumerhadi changed the title Cordovacli fail when use it with load-grunt-config Cordovacli fail when using it with load-grunt-config plugin May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant