Bit: Missing data when running build when no compiler is imported (Cannot read property 'split' of undefined)

Created on 4 Feb 2020  路  6Comments  路  Source: teambit/bit

Describe the bug

I have a workspace with tracked components, and my compiler is configured in the bit config object, but not imported yet.
Then I run bit build and I expect that bit import the compiler first, and then build the components, but I get errors on data that the compiler not receive.

Steps to Reproduce

  1. create a workspace with one file.
  2. init bit and track the file.
  3. set the compiler in the config but not import it:
{
    "bit": {
        "env": {
            "compiler": "bit.envs/compilers/typescript@[version]"
        }
    }
}
  1. run bit build

Specifications

  • Bit version: 14.7.3
  • Node version: 12.7.0
  • Platform: macOS
  • Bit compiler (include version): bit.envs/compilers/[email protected]

Additional context

Add any other context about the problem here.
image

Temporary Solution

Import the compiler bit import COMPILER LINK before running the bit build command.
The disadvantage of this solution: if you have a special configuration in the rawConfig object, they will be removed when you import the compiler.
You can see a solution I wrote to keep the configuration after the import:
https://github.com/teambit/envs/blob/master/.github/workflows/ci.yaml#L45

arebuild prioritmedium typbug

Most helpful comment

Thanks @JoshK2 the solution above does work in our Circle-CI pipeline now.

All 6 comments

That works for the second time.
Only if the compiler is installed as part of the build it's not working. looks like a missing reloads for something after importing the compiler.

I am also experiencing this issue, but specifically mine only occurs when running in a circle-ci pipeline and works fine locally.

Any suggested work arounds for this issue?

Any suggested work arounds for this issue?

I have just written a Temporary Solution in the opening comment.

Thanks @JoshK2 the solution above does work in our Circle-CI pipeline now.

This should be solved as part of the next major version - harmony

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nvthuong1996 picture nvthuong1996  路  13Comments

iboldurev picture iboldurev  路  12Comments

AlexanderKaran picture AlexanderKaran  路  10Comments

ranm8 picture ranm8  路  14Comments

itaymendel picture itaymendel  路  16Comments