打开错误:ENOENT:没有这样的文件或目录,请打开“ target / tmp / templates.js”

时间:2018-12-02 12:42:04

标签: angularjs npm gulp

我正在运行一个大生产版本。我收到一个错误“错误:ENOENT:没有这样的文件或目录,请打开'target / tmp / templates.js'”。

无法理解为什么无法创建templates.js文件。我在GitHub forrum的一篇文章中看到,在package.json文件中,我应该在gulp-angular-templatecache之前包含gulp-header。修改之后,我卸载了gulp-angular-templatecache并运行了npm-install。即使这样做之后,也会出现相同的错误。 这是gulpfile.js和gulp / build.js文件的片段 GULPFILE.JS

gulp.task('html', function () {
return gulp.src(config.app + 'app/**/*.html')
.pipe(print())
.pipe(htmlmin({collapseWhitespace: true}))
.pipe(templateCache('templates.js', {
    module: 'mommypowerApp',
    root: 'app/',
    moduleSystem: 'IIFE',
}))
.pipe(gulp.dest(config.tmp));

});

在此寻找一些输入。已经被卡住了很长时间

0 个答案:

没有答案