Trouble running on GitLab CI - unable to resolve some modules, out of memory

I’m trying to get my app to run tests in GitLab CI. I’m using chimp and I need the tests to run in one command (versus starting the app in one command and running chimp in another). So I create a script as described here, In package.json, I created these scripts

"test-for-ci": "babel-node --presets es2015 .scripts/chimp-subprocess.js 'npm run test-full-app' 'npm run test-all'",
"test-full-app": "meteor test --full-app --driver-package tmeasday:acceptance-test-driver --settings config/config.json",
"test-all": "chimp --ddp=http://localhost:3000  --mocha --path=tests",

So locally, I do meteor npm run test-for-ci and it works fine. I set up the .yml file for GitLab CI as

image: christiankiely/meteord:test


  - meteor npm install
  - meteor npm rebuild

    - npm run test-for-ci

and it runs, installs and builds the npm modules starts the test then errors with

$ npm run test-for-ci

> tyton@ test-for-ci /builds/myuser/my-app
> babel-node --presets es2015 .scripts/chimp-subprocess.js 'npm run test-full-app' 'npm run test-all'

> tyton@ test-full-app /builds/myuser/my-app
> meteor test --full-app --driver-package tmeasday:acceptance-test-driver --settings config/config.json

Even with METEOR_ALLOW_SUPERUSER or --allow-superuser, permissions in your app
directory will be incorrect if you ever attempt to perform any Meteor tasks as
a normal user. If you need to fix your permissions, run the following command
from the root of your project:

  sudo chown -Rh <username> .meteor/local

[[[[[ Tests ]]]]]

=> Started proxy.

Unable to resolve some modules:

  "system" in
  "webpage" in
  "selenium-webdriver" in
  "_debugger" in

If you notice problems related to these missing modules, consider running:

  meteor npm install --save system webpage selenium-webdriver meteor-node-stubs

<--- Last few GCs --->

  423481 ms: Scavenge 1365.3 (1457.3) -> 1365.3 (1457.3) MB, 3.7 / 0 ms (+ 3.2 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
  426118 ms: Mark-sweep 1365.3 (1457.3) -> 1359.4 (1457.3) MB, 2636.5 / 0 ms (+ 6.8 ms in 2 steps since start of marking, biggest step 3.7 ms) [last resort gc].
  427823 ms: Mark-sweep 1359.4 (1457.3) -> 1303.3 (1457.3) MB, 1705.1 / 0 ms [last resort gc].

<--- JS stacktrace --->

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

Security context: 0xe20c84b4629 <JS Object>
    2: encode(aka base64VLQ_encode) [/root/.meteor/packages/meteor-tool/.1.4.4_1.qg1yvo++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/source-map/lib/base64-vlq.js:~92] [pc=0x395cb676ca1b] (this=0x285f7b8fab21 <an Object with map 0x1896a30b5d89>,aValue=-3656)
    3: _serializeMappings(aka SourceMapGenerator_serializeMappings) [/root/.meteor/packages/meteo...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

Any ideas why it can’t find some modules? Or is the real issue just out of memory? How to resolve?

did you try to explicitly add meteor install missing packages after meteor rebuild in your yml ?

Sorry for the delay but I’ve been spending a bunch of time trying to get this to work. That issue with the missing modules resolved itself I’m not sure how. I think changing the docker image to a more recent image, blurri/meteor-node, helped the most.