Skip to content

Allow two pig.json files to reference each other without Maximum call stack size exceeded error #23

@KylePalko

Description

@KylePalko

I ran into this issue when I had an API Server that I wanted to spin up with my App Server (and vice versa)

/app/pig.json

{
  "include": {
    "../api/pig.json": "api"
  }
}

/api/pig.json

{
  "include": {
    "../app/pig.json": "app"
  }
}

This will cause the error below

RangeError: Maximum call stack size exceeded
    at fromJsonFile (/usr/local/lib/node_modules/docker-pig/lib/config.js:25:59)
    at Object.module.exports.fromFile (/usr/local/lib/node_modules/docker-pig/lib/config.js:11:16)
    at /usr/local/lib/node_modules/docker-pig/lib/config.js:49:38
    at Function.forOwn (/usr/local/lib/node_modules/docker-pig/node_modules/lodash/dist/lodash.js:2106:15)
    at resolveIncludes (/usr/local/lib/node_modules/docker-pig/lib/config.js:48:7)
    at Object.module.exports.fromFile (/usr/local/lib/node_modules/docker-pig/lib/config.js:18:12)
    at /usr/local/lib/node_modules/docker-pig/lib/config.js:49:38

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions