booster icon indicating copy to clipboard operation
booster copied to clipboard

Cannot use tsconfig.json that extends from parent directories tsconfigs

Open NickSeagull opened this issue 4 years ago • 0 comments

Bug Report

Current Behavior

When I create a tsconfig.json that extends from a parent directory (e.g. in a Lerna monorepo), and I run boost deploy from the Booster project, the CLI fails with the following error:

❯ boost deploy -e development
    Error: Error: Project contains compilation errors

    > [email protected] clean
    > rimraf ./dist tsconfig.tsbuildinfo


    > [email protected] compile
    > ttsc -b tsconfig.json

    error TS5083: Cannot read file
    '/path/to/my/monorepo/packages/tsconfig.json'.

        at Object.wrapExecError (/usr/local/lib/node_modules/@boostercloud/c
    li/dist/common/errors.js:12:12)
        at compileProject (/usr/local/lib/node_modules/@boostercloud/cli/dis
    t/services/config-service.js:34:24)
        at async Object.compileProjectAndLoadConfig (/usr/local/lib/node_mod
    ules/@boostercloud/cli/dist/services/config-service.js:25:5)
        at async Script.done (/usr/local/lib/node_modules/@boostercloud/cli/
    dist/common/script.js:74:29)
        at async Deploy.run (/usr/local/lib/node_modules/@boostercloud/cli/d
    ist/commands/deploy.js:21:13)
        at async Deploy._run (/usr/local/lib/node_modules/@boostercloud/cli/
    node_modules/@oclif/command/lib/command.js:43:20)
        at async Config.runCommand (/usr/local/lib/node_modules/@boosterclou
    d/cli/node_modules/@oclif/config/lib/config.js:173:24)
        at async Main.run (/usr/local/lib/node_modules/@boostercloud/cli/nod
    e_modules/@oclif/command/lib/main.js:27:9)
        at async Main._run (/usr/local/lib/node_modules/@boostercloud/cli/no
    de_modules/@oclif/command/lib/command.js:43:20)

If I replace the tsconfig.json that extends the parent one, with one that doesn't extend anything, it works.

Expected behavior

I should be able to deploy with a tsconfig.json that extends parent directories' tsconfig

Possible Solution

I believe that this is related to the .deploy sandbox we're creating during the deploy process, we should investigate there.

Additional information

Environment

  • Booster version: 0.17.0 and 0.16.3 (haven't tried others)
  • Node/npm version: v14.17.0/7.13.0
  • OS: OSX 11.4

NickSeagull avatar Jul 01 '21 17:07 NickSeagull