Skip to main content
adicionou 37 caracteres ao conteúdo
Fonte Link
mutlei
  • 3mil
  • 18
  • 37

I'm working on aEstou trabalhando num projeto com phonegap/angular project, so I did every step as I'm used toentão fiz todos os passos como estou acostumado. I have installedEu tenho instalado node, bower, gulp, angularjs, so as phonegap/cordova too e cordova. Then, I cloned the projectEntão eu "clonei" o projeto, installedinstalei bower/angular/gulp locally in project folder then I did alocalmente na pasta do projeto e fiz uma gulp build for building mypara compilar meu app. This is what occurs after thatIsso é o que ocorre depois disso:

So if it's going all wrong after building theEntão, se tudo está dando errado depois de compilar os arquivos js files, I think the issue resides thereeu acho que o problema está neles. What am I doing wrongO que estou fazendo de errado?

Thank youObrigado!

I'm working on a phonegap/angular project, so I did every step as I'm used to. I have installed node, bower, gulp, angularjs, so as phonegap/cordova too. Then, I cloned the project, installed bower/angular/gulp locally in project folder then I did a gulp build for building my app. This is what occurs after that:

So if it's going all wrong after building the js files, I think the issue resides there. What am I doing wrong?

Thank you!

Estou trabalhando num projeto com phonegap/angular, então fiz todos os passos como estou acostumado. Eu tenho instalado node, bower, gulp, angularjs, phonegap e cordova. Então eu "clonei" o projeto, instalei bower/angular/gulp localmente na pasta do projeto e fiz uma gulp build para compilar meu app. Isso é o que ocorre depois disso:

Então, se tudo está dando errado depois de compilar os arquivos js, eu acho que o problema está neles. O que estou fazendo de errado?

Obrigado!

Fonte Link
Van
  • 11
  • 3

Build Gulp Error

I'm working on a phonegap/angular project, so I did every step as I'm used to. I have installed node, bower, gulp, angularjs, so as phonegap/cordova too. Then, I cloned the project, installed bower/angular/gulp locally in project folder then I did a gulp build for building my app. This is what occurs after that:

11:18:43] Using gulpfile ~/*projectfolder*/gulpfile.js
[11:18:43] Starting 'build'...
[11:18:43] Starting 'clean'...
[11:18:43] Finished 'clean' after 24 ms
[11:18:43] Starting 'html'...
[11:18:43] Finished 'html' after 2.77 ms
[11:18:43] Starting 'fonts'...
[11:18:43] Starting 'images'...
[11:18:43] Starting 'less'...
[11:18:43] Finished 'less' after 5.92 ms
[11:18:43] Starting 'js'...
[11:18:43] Finished 'js' after 23 ms

events.js:85
      throw er; // Unhandled 'error' event
            ^
Error
    at new Parser (*projectfolder*/node_modules/gulp-less/node_modules/less/lib/less/parser.js:333:27)
    at Object.less.render (*projectfolder*/node_modules/gulp-less/node_modules/less/lib/less/index.js:18:22)
    at Transform._transform (*projectfolder*/node_modules/gulp-less/index.js:38:10)
    at Transform._read (*projectfolder*/node_modules/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at Transform._write (*projectfolder*/node_modules/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (*projectfolder*/node_modules/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (*projectfolder*/node_modules/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at Transform.Writable.write (*projectfolder*/gulp-less/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at write (*projectfolder*/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
    at flow (*projectfolder*/node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)

So if it's going all wrong after building the js files, I think the issue resides there. What am I doing wrong?

gulp.task('js', function() {
    streamqueue({ objectMode: true },
      gulp.src(config.vendor.js),
      gulp.src('./src/js/**/*.js').pipe(ngFilesort()),
      gulp.src(['src/templates/**/*.html']).pipe(templateCache({ module: 'InfoBox' }))
    )
    .pipe(sourcemaps.init())
    .pipe(concat('app.js'))
    .pipe(ngAnnotate())
    .pipe(uglify())
    .pipe(sourcemaps.write('.'))
    .pipe(rename({suffix: '.min'}))
    .pipe(gulp.dest(path.join(config.dest, 'js')));
});

Thank you!