$meteor will not run with env. variable METEOR_SETTINGS

Hi, according to meteor docs I can use METEOR_SETTINGS env variable insted of settings.json file.

On Windows I do:

SET METEOR_SETTINGS='{"facebook":{"appId":"<someId>","secret":"<someSecret>"}}'

and then

meteor

But it fails

C:\Users\Jiri\AppData\Local\.meteor\packages\meteor-tool\1.3.4_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:165
      throw error;
            ^
Error: isopacket load failed?
    at loadIsopacketFromDisk (C:\tools\tool-env\isopackets.js:286:11)
    at C:\tools\tool-env\isopackets.js:88:23
    at Object.exports.noYieldsAllowed (C:\tools\utils\fiber-helpers.js:37:14)
    at Object.load (C:\tools\tool-env\isopackets.js:80:23)
    at ProjectContext._buildResolver (C:\tools\project-context.js:717:22)
    at C:\tools\project-context.js:492:29
    at C:\tools\utils\buildmessage.js:359:18
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:352:34
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:350:23
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
    at C:\tools\project-context.js:491:20
    at C:\tools\packaging\catalog\catalog.js:100:5
    at C:\tools\utils\buildmessage.js:271:13
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:264:29
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:262:18
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:253:23
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.capture (C:\tools\utils\buildmessage.js:252:19)
    at Object.catalog.runAndRetryWithRefreshIfHelpful (C:\tools\packaging\catalog\catalog.js:99:31)
    at ProjectContext._.extend._resolveConstraints (C:\tools\project-context.js:490:13)
    at C:\tools\project-context.js:281:9
    at C:\tools\utils\buildmessage.js:359:18
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:352:34
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:350:23
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.enterJob (C:\tools\utils\buildmessage.js:324:26)
    at ProjectContext._completeStagesThrough (C:\tools\project-context.js:271:18)
    at C:\tools\project-context.js:263:12
    at Function.run (C:\tools\tool-env\profile.js:489:12)
    at ProjectContext.prepareProjectForBuild (C:\tools\project-context.js:262:13)
    at C:\tools\runners\run-app.js:557:29
    at C:\tools\utils\buildmessage.js:271:13
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:264:29
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:262:18
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at C:\tools\utils\buildmessage.js:253:23
    at [object Object].withValue (C:\tools\utils\fiber-helpers.js:89:14)
    at Object.capture (C:\tools\utils\buildmessage.js:252:19)
    at bundleApp (C:\tools\runners\run-app.js:556:31)
    at AppRunner._runOnce (C:\tools\runners\run-app.js:634:35)
    at AppRunner._fiber (C:\tools\runners\run-app.js:887:28)
    at C:\tools\runners\run-app.js:411:12

There is this Github issue dealing with the same problem. I tried to remove all whitespaces from METEOR_SETTINGS, but it returns the same error.

The METEOR_SETTINGS environment variable is only meant for running the deployed production node app, not for the actual Meteor tool.

This is what the docs means by:

When running your server directly (e.g. from a bundle)

For the meteor tool, you should just pass the settings as a file:

meteor --settings settings.json

…where settings.json is a JSON file in your project root. This is in order to allow full-reactivity from the meteor tool during development. Once you deploy to production, use METEOR_SETTINGS which remain the same and do not need to be monitored for changes.

2 Likes