CircleCI超时,它与节点和排列有关

时间:2016-06-03 00:18:47

标签: node.js eslint circleci

CircleCI在使用节点运行eslint时超时。

我收到以下错误消息:

command ... took more than 10 minutes since last output

在我的本地机器上,只需17秒。

(下面的答案......)

1 个答案:

答案 0 :(得分:0)

我使用“通过SSH调试”登录CircleCI。我证实了eslint挂了。然后,我想出了如何获得更多调试信息:

DEBUG=eslint:cli-engine eslint .

很长一段时间后,Node真的崩溃了:

<--- Last few GCs --->

  345472 ms: Scavenge 1399.8 (1457.3) -> 1399.8 (1457.3) MB, 38.0 / 0 ms (+ 6.8 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
  348177 ms: Mark-sweep 1399.8 (1457.3) -> 1399.8 (1457.3) MB, 2705.8 / 0 ms (+ 8.7 ms in 2 steps since start of marking, biggest step 6.8 ms) [last resort gc].
  350927 ms: Mark-sweep 1399.8 (1457.3) -> 1399.5 (1457.3) MB, 2749.7 / 0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0xd2a8c0b4629 <JS Object>
    1: /* anonymous */ [/home/ubuntu/website-django/static/node_modules/babel-eslint/babylon-to-espree/toToken.js:~1] [pc=0x33a525e2adb9] (this=0x1e91da709851 <JS Global Object>,token=0x349f83a2fc01 <a Token with map 0x3b6a9d8c2e31>,tt=0x2c0cfbd85ee1 <an Object with map 0x3b6a9d898959>,source=0x3314aa504101 <Very long string[1177579]>)
    2: toTokens [/home/ubuntu/website-django/static/node_mod...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Aborted (core dumped)

最后,我意识到它试图lint我的构建目录,其中包含一堆第三方库,包括Highchart,已知它们因为它们太大而引起了问题。

我将此添加到我的.eslintignore:

build/**

然后,问题就消失了。

带回家的信息是:确保你只是在弄掉你需要的东西。