Swiip / generator-gulp-angular

Yeoman generator for AngularJS with GulpJS [UNMAINTAINED next iteration is FountainJS]
http://fountainjs.io
3.72k stars 664 forks source link

Gulp Build is failing : Can't find templateCacheHtml.js #1149

Open shantanugautam opened 8 years ago

shantanugautam commented 8 years ago

This is a fresh response from a freshly generated project

fs.js:839
  return binding.lstat(pathModule._makeLong(path));
                                  ^

Error: ENOENT: no such file or directory, lstat '/usr/local/var/www/gulp-angular-test/src/app/templateCacheHtml.js'
    at Error (native)
    at Object.fs.lstatSync (fs.js:839:18)
    at DestroyableTransform.TransformStream [as _transform] (/usr/local/var/www/gulp-angular-test/node_modules/gulp-header/index.js:38:12)
    at DestroyableTransform.Transform._read (/usr/local/var/www/gulp-angular-test/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10)
    at DestroyableTransform.Transform._write (/usr/local/var/www/gulp-angular-test/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83)
    at doWrite (/usr/local/var/www/gulp-angular-test/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:313:64)
    at writeOrBuffer (/usr/local/var/www/gulp-angular-test/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:302:5)
    at DestroyableTransform.Writable.write (/usr/local/var/www/gulp-angular-test/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:241:11)
    at write (/usr/local/var/www/gulp-angular-test/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:623:24)
    at flow (/usr/local/var/www/gulp-angular-test/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:632:7)
    at DestroyableTransform.pipeOnReadable (/usr/local/var/www/gulp-angular-test/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:664:5)
    at emitNone (events.js:67:13)
    at DestroyableTransform.emit (events.js:166:7)
    at emitReadable_ (/usr/local/var/www/gulp-angular-test/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:448:10)
    at emitReadable (/usr/local/var/www/gulp-angular-test/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:444:5)
    at readableAddChunk (/usr/local/var/www/gulp-angular-test/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:187:9)
jeansaigne commented 8 years ago

+1

Same problem here when i try to build the project, however "gulp serve" works as expected, but actually it's written on the main page "build:failing"...

zckrs commented 8 years ago

Hi, can you try with https://github.com/FountainJS/generator-fountain-webapp who is the next iteration of gulp-angular ?

shantanugautam commented 8 years ago

i am working on existing project. just created a test project to verify if there was an issue there . The problem was with angular template cache , its unable to create a file if it doesn't exist at this step

            .pipe($.angularTemplatecache('templateCacheHtml.js', {
                module: '<modulename>',
                root: 'app'
            }))

You have to manually create it .

danivek commented 8 years ago

problem is in gulp-header, see issue https://github.com/tracker1/gulp-header/issues/37

shantanugautam commented 8 years ago

@danivek thank you for identifying the root cause. Much appreciated

gintsgints commented 8 years ago

Confirm that adding:

"gulp-header": "1.8.2"

to package.json dev dependencies, works as workaround.

mescher commented 8 years ago

I had the error on wercker.com when building my app. Adding "gulp-header": "1.8.2" to package.json solved the issue. Thanks!

vucalur commented 8 years ago

Maybe somebody will find this useful:

Adding gulp-header@1.8.2 didn't work for my app, neither did removing whole node_modules and npm-install-ing them from scratch.

Since I wasn't able to reproduce this on freshly bootstrapped Todo-MVC (generator-fountain-angular1@0.6.0), what finally helped was copying it's node_modules to my project and installing only additional deps. Apart from those additional deps, there were no differences between package.json files. Crazy.