【问题标题】:Gulp watch shows a lot of eslint errors. Which dependencies are missing?Gulp watch 显示很多 eslint 错误。缺少哪些依赖项?
【发布时间】:2018-10-03 18:02:09
【问题描述】:

我用Generator-M-Ionic制作了一个git clone应用Ionic 1

我已完成以下步骤来安装依赖项:

npm install
bower install
npm install --global gulp-cli

以及生成器本身的先决条件:

npm i -g yo gulp bower
npm i -g generator-m-ionic

之后的命令

gulp watch

终端执行正常

[13:58:09] Starting 'jsonlint'...
[13:58:10] Finished 'watch' after 191 ms
[Browsersync] Access URLs:
 ----------------------------------------
       Local: http://localhost:3000
    External: http://192.168.100.235:3000
 ----------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.100.235:3001
 ----------------------------------------
[Browsersync] Serving files from: app
[Browsersync] Serving files from: .tmp
[13:58:10] Finished 'jsonlint' after 488 ms

但稍后会在终端中出现如下几个错误,我的浏览器只打开一个空屏幕。

app/main/controllers/logoutCtrl.js
   2:1   error    "SocialWaveApp" is not defined          no-undef
   3:3   warning  Unexpected console statement            no-console
   4:3   error    "mixpanel" is not defined               no-undef
   8:9   error    "hideSheet" is defined but never used   no-unused-vars
  13:32  error    "index" is defined but never used       no-unused-vars
  17:9   error    "mixpanel" is not defined               no-undef
  22:9   warning  Unexpected console statement            no-console
  30:11  error    "facebookConnectPlugin" is not defined  no-undef
  34:13  warning  Unexpected console statement            no-console

如何找出依赖项和缺少什么?

【问题讨论】:

    标签: ionic-framework gulp eslint


    【解决方案1】:

    问题在于像 fserve 这样的一些依赖项只能在 Mac 上运行,因此解决方案是转移到 ma​​cbook,现在该应用程序可以工作了。

    eslint 错误仅表明我的项目没有使用 JS 指南。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-27
      • 2019-04-14
      • 2018-04-17
      相关资源
      最近更新 更多