Gulp Gulp 构建问题

k75qkfdt  于 2022-12-08  发布在  Gulp
关注(0)|答案(1)|浏览(160)

项目类型:谷歌应用引擎上的WordPress。

问题

运行Gulp并有一些错误阻止我的项目准备在浏览器中查看Propelry。
我在我的项目中运行了gulp,得到了以下错误日志:

[14:34:53] Using gulpfile C:\dev\projects\romac-website\web\app\themes\romac\gulpfile.js
[14:34:53] Starting 'clean'...
[14:34:53] Finished 'clean' after 46 ms
[14:34:53] Starting 'default'...
[14:34:53] Starting 'build'...
[14:34:53] Starting 'wiredep'...
[14:34:58] Finished 'default' after 5.69 s
[14:34:59] Finished 'wiredep' after 6.06 s
[14:34:59] Starting 'styles'...
'main.less' wasn't found. Tried - C:\dev\projects\romac-website\web\app\themes\romac\assets\styles\main.less,main.less in file C:\dev\projects\romac-website\web\app\themes\romac\assets\styles\editor-style.scss line no. 1
'pages/_stories.less' wasn't found. Tried - C:\dev\projects\romac-website\web\app\themes\romac\assets\styles\pages\_stories.less,pages\_stories.less in file C:\dev\projects\romac-website\web\app\themes\romac\assets\styles\main.scss line no. 33
[14:34:59] Finished 'styles' after 711 ms
[14:34:59] Starting 'jshint'...

assets\scripts\referral.js
  line 801   col 14  'attachClickHandlers' was used before it was defined.
  line 907   col 14  'attachChangeHandlers' was used before it was defined.
  line 1039  col 14  'initSelect2Lists' was used before it was defined.
  line 1052  col 14  'initDatePicker' was used before it was defined.
  line 1068  col 14  'initProgressList' was used before it was defined.
  line 1187  col 14  'previewImage' was used before it was defined.
  line 1207  col 14  'ping' was used before it was defined.
  line 1295  col 14  'updateConfirmationPage' was used before it was defined.
  line 1455  col 14  'updateAccompanimentSelectList' was used before it was defined.
  line 1511  col 14  'doesValidate' was used before it was defined.
  line 1551  col 14  'convertReferralToJsonString' was used before it was defined.
  line 1602  col 14  'onSubmitSuccess' was used before it was defined.
  line 1627  col 14  'onSubmitFailure' was used before it was defined.

  ‼  13 warnings

[14:35:00] Finished 'jshint' after 561 ms
[14:35:00] Starting 'scripts'...
[14:35:01] Finished 'scripts' after 508 ms
[14:35:01] Starting 'fonts'...
[14:35:01] Starting 'images'...

events.js:183
      throw er; // Unhandled 'error' event
      ^
Error: spawn C:\dev\projects\romac-website\web\app\themes\romac\node_modules\optipng-bin\vendor\optipng.exe ENOENT
    at _errnoException (util.js:1024:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

因此,以我有限的理解,阅读错误日志似乎表明我的项目构建存在以下问题:
1.启动“styles”---〉查找.less文件时出现问题
1.启动'jshint' ---〉对文件referral.js中的某些代码不满意
1.启动“images”---〉节点模块optipng-bin出现问题
当我运行本地服务器(应用引擎)时,我会得到favicon加载,没有其他内容,只是一个空白页面。

问题

我对错误的最初理解是否正确?我如何解决?
PS让我知道,如果我需要编辑这与更多的信息。

a6b3iqyw

a6b3iqyw1#

请运行此命令“npm rebuild optipng-bin”。这主要是由于损坏的包“optipng-bin”

相关问题