MEAN Stack在CentOS 6.10上不起作用(多个错误)

时间:2018-08-17 05:23:21

标签: centos mean-stack

在CentOS 6.10 x86_64中,我已经安装了MEAN Stack(github / meanjs / mean),并且在运行命令npm start时遇到了此异常错误。 服务器将以47错误开始,最后将以0.0.0.0:3000结尾。并且我已经更改为工作域,但仍然没有用。 即使我不使用--fix,仍然使用--fix force也无效。 如果我添加一个像www.example.com或IP地址123.45.678.10这样的域,则会以很多新错误结束。

下面是控制台的输出

npm start

> meanjs@0.6.0 start /home/mykampaign/public_html/testplan/mean
> gulp

[05:00:11] Using gulpfile /home/mykampaign/public_html/testplan/mean/gulpfile.js
[05:00:11] Starting 'default'...
[05:00:11] Starting 'env:dev'...
[05:00:11] Finished 'env:dev' after 497 μs
[05:00:11] Starting 'copyLocalEnvConfig'...
[05:00:11] Starting 'makeUploadsDir'...
[05:00:11] Finished 'makeUploadsDir' after 423 μs
[05:00:11] Finished 'copyLocalEnvConfig' after 72 ms
[05:00:11] Starting 'lint'...
[05:00:11] Starting 'less'...
[05:00:12] Finished 'less' after 1.04 s
[05:00:12] Starting 'sass'...
[05:00:12] Finished 'sass' after 304 ms
[05:00:12] Starting 'csslint'...
[05:00:13] Starting 'eslint'...
(node:28244) DeprecationWarning: [eslint] The 'ecmaFeatures' config file property is deprecated, and has no effect. (found in airbnb/legacy)
[05:00:14] Finished 'csslint' after 1.92 s
[05:00:20]
/home/mykampaign/public_html/testplan/mean/gulpfile.js
  120:1  error  Expected indentation of 2 spaces but found 4  indent
  121:1  error  Expected indentation of 2 spaces but found 4  indent

/home/mykampaign/public_html/testplan/mean/modules/users/server/config/strategies/google.js
  21:1  error  Expected indentation of 2 spaces but found 4  indent
  22:1  error  Expected indentation of 4 spaces but found 6  indent
  23:1  error  Expected indentation of 4 spaces but found 6  indent
  24:1  error  Expected indentation of 4 spaces but found 6  indent
  25:1  error  Expected indentation of 4 spaces but found 6  indent
  27:1  error  Expected indentation of 4 spaces but found 6  indent
  28:1  error  Expected indentation of 4 spaces but found 6  indent
  29:1  error  Expected indentation of 6 spaces but found 8  indent
  30:1  error  Expected indentation of 6 spaces but found 8  indent
  31:1  error  Expected indentation of 6 spaces but found 8  indent
  32:1  error  Expected indentation of 6 spaces but found 8  indent
  33:1  error  Expected indentation of 6 spaces but found 8  indent
  34:1  error  Expected indentation of 6 spaces but found 8  indent
  35:1  error  Expected indentation of 6 spaces but found 8  indent
  36:1  error  Expected indentation of 6 spaces but found 8  indent
  37:1  error  Expected indentation of 6 spaces but found 8  indent
  38:1  error  Expected indentation of 4 spaces but found 6  indent
  41:1  error  Expected indentation of 4 spaces but found 6  indent
  42:1  error  Expected indentation of 2 spaces but found 4  indent

/home/mykampaign/public_html/testplan/mean/modules/core/client/services/interceptors/auth-interceptor.client.service.js
  34:21  error  Multiple spaces found before '// Handle erro...'  no-multi-spaces

/home/mykampaign/public_html/testplan/mean/modules/users/tests/server/user.server.model.tests.js
  263:1  error  Expected indentation of 8 spaces but found 6    indent
  264:1  error  Expected indentation of 10 spaces but found 8   indent
  265:1  error  Expected indentation of 10 spaces but found 8   indent
  266:1  error  Expected indentation of 12 spaces but found 10  indent
  267:1  error  Expected indentation of 10 spaces but found 8   indent
  268:1  error  Expected indentation of 8 spaces but found 6    indent
  269:1  error  Expected indentation of 8 spaces but found 6    indent
  270:1  error  Expected indentation of 10 spaces but found 8   indent
  271:1  error  Expected indentation of 8 spaces but found 6    indent

/home/mykampaign/public_html/testplan/mean/modules/users/tests/server/user.server.routes.tests.js
  487:1  error  Expected indentation of 14 spaces but found 12  indent
  488:1  error  Expected indentation of 14 spaces but found 12  indent
  490:1  error  Expected indentation of 16 spaces but found 14  indent
  491:1  error  Expected indentation of 18 spaces but found 16  indent
  492:1  error  Expected indentation of 16 spaces but found 14  indent
  494:1  error  Expected indentation of 16 spaces but found 14  indent
  496:1  error  Expected indentation of 16 spaces but found 14  indent
  497:1  error  Expected indentation of 14 spaces but found 12  indent
  521:1  error  Expected indentation of 12 spaces but found 10  indent
  522:1  error  Expected indentation of 12 spaces but found 10  indent
  524:1  error  Expected indentation of 14 spaces but found 12  indent
  525:1  error  Expected indentation of 16 spaces but found 14  indent
  526:1  error  Expected indentation of 14 spaces but found 12  indent
  528:1  error  Expected indentation of 14 spaces but found 12  indent
  530:1  error  Expected indentation of 14 spaces but found 12  indent
  531:1  error  Expected indentation of 12 spaces but found 10  indent

✖ 47 problems (47 errors, 0 warnings)
  47 errors, 0 warnings potentially fixable with the `--fix` option.

[05:00:20] Finished 'eslint' after 7.42 s
[05:00:20] Finished 'lint' after 8.86 s
[05:00:20] Starting 'nodemon'...
[05:00:20] Finished 'nodemon' after 129 ms
[05:00:20] Starting 'watch'...
[05:00:20] Finished 'watch' after 270 ms
[05:00:20] Finished 'default' after 9.34 s
[05:00:20] [nodemon] 1.11.0
[05:00:20] [nodemon] to restart at any time, enter `rs`
[05:00:20] [nodemon] ignoring: /home/mykampaign/public_html/testplan/mean/.git/**/* .nyc_output .sass-cache bower_components coverage /home/mykampaign/public_html/testplan/mean/node_modules/**/*
[05:00:20] [nodemon] watching: modules/*/server/views/*.html server.js config/**/*.js modules/*/server/**/*.js modules/*/server/config/*.js
[05:00:20] [nodemon] watching extensions: js,html
[05:00:20] [nodemon] starting `node --inspect server.js`
[05:00:20] [nodemon] child pid: 28258
Debugger listening on ws://127.0.0.1:9229/f25bcd4b-d765-42db-9b0a-9e506a9c1045
For help see https://nodejs.org/en/docs/inspector
[05:00:21] [nodemon] watching 175 files


+ Important warning: config.domain is empty. It should be set to the fully qualified domain of the app.
--
MEAN.JS - Development Environment

Environment:     development
Server:          http://0.0.0.0:3000
Database:        mongodb://localhost/mean-dev
App version:     0.6.0
MEAN.JS version: 0.6.0

1 个答案:

答案 0 :(得分:0)

47个错误由eslint产生,该命令检查缩进规则是否符合要求。

/home/mykampaign/public_html/testplan/mean/gulpfile.js 120:1 error Expected indentation of 2 spaces but found 4 indent 表示您在第120行使用的是4个空格而不是2个

由于您不想修改meanjs代码,因此可以更改eslint配置或将其禁用。