Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"No such file or directory, /src/app/templateCacheHtml.js" when running gulp build

I'm using the gulp-angular yeoman generator and if I create a new project, and then run gulp build or gulp serve:dist I get back this error:

Whenever I try to build my project, I get this error:

[16:03:56] gulp-inject 2 files into index.less. fs.js:887 return binding.lstat(pathModule._makeLong(path)); ^

Error: ENOENT: no such file or directory, lstat '/Users/danielrvt/IdeaProjects/rztest/src/app/templateCacheHtml.js' at Error (native) at Object.fs.lstatSync (fs.js:887:18) at DestroyableTransform.TransformStream as _transform at DestroyableTransform.Transform.read (/Users/danielrvt/IdeaProjects/rztest/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10) at DestroyableTransform.Transform._write (/Users/danielrvt/IdeaProjects/rztest/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83) at doWrite (/Users/danielrvt/IdeaProjects/rztest/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:313:64) at writeOrBuffer (/Users/danielrvt/IdeaProjects/rztest/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:302:5) at DestroyableTransform.Writable.write (/Users/danielrvt/IdeaProjects/rztest/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:241:11) at write (/Users/danielrvt/IdeaProjects/rztest/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:623:24) at flow (/Users/danielrvt/IdeaProjects/rztest/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:632:7) at DestroyableTransform.pipeOnReadable (/Users/danielrvt/IdeaProjects/rztest/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:664:5) at emitNone (events.js:80:13) at DestroyableTransform.emit (events.js:179:7) at emitReadable (/Users/danielrvt/IdeaProjects/rztest/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:448:10) at emitReadable (/Users/danielrvt/IdeaProjects/rztest/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:444:5) at readableAddChunk (/Users/danielrvt/IdeaProjects/rztest/node_modules/gulp-concat/node_modules/readable-stream/lib/_stream_readable.js:187:9)

like image 887
danielrvt Avatar asked Jun 17 '16 21:06

danielrvt


1 Answers

Fix

The fix included in issue #37 has been released so the below workaround is no longer necessary. The error should not be present anymore after performing an npm update.


Cause

This error is being caused by a recent update (v1.8.3) in the gulp-header library.

An issue has already been created for you to track.

gulp-angular-templatecache has an indirect dependency on gulp-header, which is mentioned in a few of the comments.

Workaround

Until a fix is released, you can add a node dependency for the previous version of gulp-header to package.json. However, the ticket has been closed so a release should come shortly.

"dependencies": {
    "gulp-header": "1.8.2"
}
like image 68
Taylor Buchanan Avatar answered Nov 13 '22 00:11

Taylor Buchanan