每当我尝试构建我的项目时,我都会收到此错误:
@H_404_36@[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" }@H_404_36@ 原文链接:https://www.f2er.com/angularjs/141638.html