angularjs – 运行gulp build时“没有这样的文件或目录,/ src / app / templateCacheHtml.js”

前端之家收集整理的这篇文章主要介绍了angularjs – 运行gulp build时“没有这样的文件或目录,/ src / app / templateCacheHtml.js”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用gulp-angular yeoman生成器,如果我创建一个新项目,然后运行gulp build或gulp serve:dist我得到了这个错误

每当我尝试构建我的项目时,我都会收到此错误

[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)

固定

问题#37中包含的修复程序已经发布,因此不再需要以下解决方法.执行npm更新后,错误不应再出现.

原因

错误是由gulp-header库中的最新更新(v1.8.3)引起的.

已经创建了一个issue供您跟踪.

gulp-angular-templatecache对gulp-header有间接依赖,在一些注释中提到了这一点.

解决方法

在发布修复程序之前,您可以将以前版本的gulp-header的节点依赖项添加到package.json.但是,机票已经关闭,所以很快就会发布.

"dependencies": {
    "gulp-header": "1.8.2"
}

猜你在找的Angularjs相关文章