Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
JoshK2 opened this issue Feb 4, 2020 · 7 comments

Comments

@JoshK2
Copy link
Member

JoshK2 commented Feb 4, 2020

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/typescript@3.1.38

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

@GiladShoham
Copy link
Member

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.

@patrickcze
Copy link

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

@patrickcze
Copy link

Any suggested work arounds for this issue?

@JoshK2 JoshK2 changed the title Missing data when running build when no compiler is imported Missing data when running build when no compiler is imported (Cannot read property 'split' of undefined) Mar 4, 2020
@JoshK2
Copy link
Member Author

JoshK2 commented Mar 4, 2020

Any suggested work arounds for this issue?

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

@patrickcze
Copy link

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

@GiladShoham
Copy link
Member

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

@itaymendel
Copy link
Contributor

itaymendel commented Mar 7, 2021

irrelevant for v15

We'll start rolling out v15 of Bit this week, please reach out to me privately on the public slack community for a sneak peek and getting early access to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants