Gulp Build is failing : Can't find templateCacheHtml.js
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)
+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"...
Hi, can you try with https://github.com/FountainJS/generator-fountain-webapp who is the next iteration of gulp-angular ?
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 .
problem is in gulp-header, see issue https://github.com/tracker1/gulp-header/issues/37
@danivek thank you for identifying the root cause. Much appreciated
Confirm that adding:
"gulp-header": "1.8.2"
to package.json dev dependencies, works as workaround.
I had the error on wercker.com when building my app. Adding "gulp-header": "1.8.2" to package.json solved the issue. Thanks!
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.