Gulp 未处理的错误 182

Gulp unhandled error 182

我有一个 django 博客项目,我正在尝试使用 bower 来管理我的包。

当从我的控制台 运行 'gulp' 时,我收到以下错误:

(py3) ➜  nomadpad git:(master) ✗ gulp
[15:16:15] Using gulpfile ~/code/nomadpad/gulpfile.js
[15:16:15] Starting 'css'...
[15:16:16] Finished 'css' after 1.23 s
[15:16:16] Starting 'html'...
[15:16:16] Finished 'html' after 3.38 ms
[15:16:16] Starting 'scripts'...
[15:16:16] Finished 'scripts' after 4.43 ms
[15:16:16] Starting 'default'...
[15:16:16] Finished 'default' after 38 μs

events.js:182
      throw er; // Unhandled 'error' event
  ^
CssSyntaxError: /Users/davidmellor/code/nomadpad/bower_components/jquery/dist/jquery.js:756:9: Unknown word
at Input.error (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/input.js:119:22)
at Parser.unknownWord (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/parser.js:506:26)
at Parser.other (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/parser.js:171:18)
at Parser.parse (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/parser.js:84:26)
at parse (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/parse.js:24:16)
at new LazyResult (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/lazy-result.js:70:24)
at Processor.process (/Users/davidmellor/code/nomadpad/node_modules/postcss/lib/processor.js:117:12)
at /Users/davidmellor/code/nomadpad/node_modules/gulp-postcss/index.js:51:12
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)

我的 bower.json 在根文件夹中如下所示:

{
  "name": "blog_postcssgulp",
  "description": "",
  "main": "gulpfile.js",
  "authors": [
    "DMells <dave@davemellor.com>"
  ],
  "license": "ISC",
  "homepage": "https://github.com/DMells/nomadpad",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "test",
    "tests"
  ],
  "dependencies": {
    "jquery": "^3.3.1",
    "modernizr": "^3.5.0"
  }
}

我不知道该怎么办,请问有人可以帮忙吗?

非常感谢

如果其他人遇到此问题,我通过删除 bower_components 文件夹然后重新安装 bower 以及 jquery 软件包找到了解决方案。

npm install bower --save-dev

然后是 jquery 包:

bower install jquery --save-dev