Closed sekar-worx closed 7 years ago
Could you copy paste the exact error and stack trace?
Or better, your gulp file. I think you misconfigured it.
Hey Sam, Thanks for reply. I just copied the gulp file code which is you provided in readme.md file. In this in gulp-cordova-version through function code is not calling. Only the through callback only works. I think the project variable is not initialised.
The stack trace is
[12:37:58] Using gulpfile ~/ghs/gulpfile.js [12:37:58] Starting 'build'... [12:37:58] 'build' errored after 17 ms [12:37:58] Error in plugin 'gulp-cordova-version' Message: Cannot read property 'path' of undefined
So you did this?
var gulp = require('gulp'),
create = require('gulp-cordova-create'),
version = require('gulp-cordova-version');
gulp.task('build', function() {
return gulp.src('dist')
.pipe(create())
.pipe(version('2.3.1'));
});
Does the dist
directory exist?
Yes, I did the same thing. No dist is not exist.
That's the problem. dist
is the directory with all the files that you want to package as cordova application. I agree that the error message should be more descriptive so I will leave this open and change the title.
Aha, already have an issue for this right here. So closing this one.
Hi Sam, Can you please provide sample folder structure app ?
project
|- gulpfile.js
|- dist
|- index.html
|- app.js
Something like this
Hi Sam, Thanks for reply. I used same structure like you mentioned. But it is not updating config.xml. It is only show response like this
gulp build [14:00:29] Using gulpfile ~/gulpfile.js [14:00:29] Starting 'build'...
Hi Sam, Now i am fixed it and it's working. Thank you.
In gulp-cordova-version module returns path undefined issue in profile.path code. I fixed it temporary by using var profile = { path: '' }. Please fix this.