Gulp手表显示了很多的eslint错误。缺少哪些依赖项?

时间:2018-04-23 16:01:31

标签: ionic-framework gulp eslint

我用Generator-M-Ionic制作了一个git clone app 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

如何找出依赖项和缺少的内容?

1 个答案:

答案 0 :(得分:0)

问题在于某些依赖项,例如 fserve ,只能在Mac上运行,因此解决方案转移到 macbook ,现在应用程序正常工作。

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