generator-gulp-angular icon indicating copy to clipboard operation
generator-gulp-angular copied to clipboard

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

Open shantanugautam opened this issue 9 years ago • 8 comments

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)

shantanugautam avatar Jun 17 '16 11:06 shantanugautam

+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"...

jeansaigne avatar Jun 17 '16 11:06 jeansaigne

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

zckrs avatar Jun 17 '16 11:06 zckrs

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 .

shantanugautam avatar Jun 17 '16 12:06 shantanugautam

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

danivek avatar Jun 17 '16 13:06 danivek

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

shantanugautam avatar Jun 17 '16 13:06 shantanugautam

Confirm that adding:

"gulp-header": "1.8.2"

to package.json dev dependencies, works as workaround.

gintsgints avatar Jun 18 '16 10:06 gintsgints

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

mescher avatar Jun 20 '16 13:06 mescher

Maybe somebody will find this useful:

Adding [email protected] 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 ([email protected]), 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.

vucalur avatar Aug 04 '16 11:08 vucalur