当前正在运行:
问题与软件包版本有关,因为该软件包以前曾在其他PC上运行过,但是由于某种原因,我似乎无法在新计算机上安装该项目。
在进行gulp构建后,它会向我返回以下错误:
C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\async.js:48 fn = function () { throw arg; }; ^ Error: UnCSS: no HTML files found at getHTML (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\uncss\src\uncss.js:37:15) at C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\uncss\src\uncss.js:246:20 at tryCatcher (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\util.js:11:23) at C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\using.js:184:26 at tryCatcher (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\util.js:11:23) at Promise._settlePromiseFromHandler (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise.js:491:31) at Promise._settlePromise (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise.js:548:18) at Promise._settlePromise0 (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise.js:593:10) at Promise._settlePromises (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise.js:676:18) at Promise._fulfill (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise.js:617:18) at PromiseArray._resolve (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise_array.js:125:19) at PromiseArray._promiseFulfilled (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise_array.js:143:14) at Promise._settlePromise (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise.js:553:26) at Promise._settlePromise0 (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise.js:593:10) at Promise._settlePromises (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\promise.js:676:18) at Async._drainQueue (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\async.js:125:16) at Async._drainQueues (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\async.js:135:10) at Immediate.Async.drainQueues (C:\Users\fabio.madeira\Desktop\project\project-api\node_modules\gulp-uncss\node_modules\bluebird\js\release\async.js:16:14) at runCallback (timers.js:672:20) at tryOnImmediate (timers.js:645:5) at processImmediate [as _immediateCallback] (timers.js:617:5)
调用uncss的代码:
var config = require(lp.path + 'public/build.json');
var jsFilter = plug.filter(['**/*.js']);
var cssFilter = plug.filter(['**/*.css']);
// Compile All CSSs
log('Compiling And Minify Stylesheet of Landing Page ' + config.name);
if (lp.name !== config.name) {
log('[WARNING] names do not match: ' + lp.name + '/' + config.name);
var modConfig = require(lp.path + 'module/config.json');
if (lp.name.indexOf(modConfig.LPName) < 0) {
log('[WARNING] names do not match with config.json: ' + lp.name + '/' + modConfig.LPName);
}
}
// check files out-of-place
config.css_in.forEach(function(p) {
if (p.indexOf(config.path) < 0 && p.indexOf('../wwwroot/') < 0) {
log('including: ', p);
}
});
gulp.src(config.css_in)
.pipe(cssFilter)
.pipe(plug.concat(config.css_out))
.pipe(uncss({
html: [config.path + 'index.html'],
ignore: [".inputer", "@font-face"]
}))
.pipe(plug.sourcemaps.init())
.pipe(cleanCSS({keepSpecialComments : 0, compatibility: 'ie8'}))
.pipe(plug.sourcemaps.write(config.maps))
.pipe(gulp.dest(config.path));
// Compile All JSs
log('Compiling And Minify Javascript of Landing Page ' + config.name);
// check files out-of-place
config.js_in.forEach(function(p) {
if (p.indexOf(config.path) < 0 && p.indexOf('../wwwroot/') < 0) {
log('including: ', p);
}
});
关于哪个包装模块使gulp返回有关此错误的任何建议?女巫,我应该尝试更新...
我试图将两个npm都更新为最新版本,但出现了更多错误。
谢谢