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

Issue with Importing ConfigWriterList from @teambit/workspace-config-files when bit tag #7765

Closed
aliansyahFirdaus opened this issue Aug 9, 2023 · 1 comment
Labels

Comments

@aliansyahFirdaus
Copy link

aliansyahFirdaus commented Aug 9, 2023

Describe the bug

I encountered an error while working on the env task in my project. The error message is as follows:

/Users/yourname/Library/Caches/Bit/capsules/5dbfad867fcasddf6633de195324cf590c7fda3e28/[email protected]/your-env.bit-env.ts:30:10 - error TS2614: Module '"@teambit/workspace-config-files"' has no exported member 'ConfigWriterList'. Did you mean to use 'import ConfigWriterList from "@teambit/workspace-config-files"' instead?

This occurred when I was trying to execute the bit tag command. It seems like there might be an issue with the import statement for ConfigWriterList from @teambit/workspace-config-files.

Could you please provide guidance on how to address this issue? Is there a different way to import ConfigWriterList or is there a workaround to make the bit tag command work in this context?

this is code error:

import { ConfigWriterList } from '@teambit/workspace-config-files';

workspaceConfig() {
    return ConfigWriterList.from([
      TypescriptConfigWriter.from({
        tsconfig: this.tsconfigPath,
        types: resolveTypes(__dirname, [this.tsTypesPath]),
      }),
      EslintConfigWriter.from({
        configPath: this.eslintConfigPath,
        tsconfig: this.tsconfigPath,
      }),
      PrettierConfigWriter.from({
        configPath: this.prettierConfigPath,
      }),
    ]);
}

Thank you for your assistance.

Steps to Reproduce

  1. Create a new Bit project using the command 'bit new project-name'.
  2. Environments will be generated automatically. Check the **/*.env.bit-env.ts files.
  3. Verify if there is a task named 'workspaceConfig()' at the bottom of the environment file, below the 'build()' task.
  4. Create a new component using the command 'bit create react-component component-name'.
  5. Run the command 'bit tag'.
  6. Error will appear.

Expected Behavior

I expected to successfully execute the bit tag command without having to comment out the problematic env task (workspaceConfig)

Screenshots, exceptions and logs

259469548-2369ca49-da6c-44f4-bcde-483da2cf26a2

Specifications

Bit version: 0.1.74 (downgrade because 0.2.14 can't rename comp)
Workspace Type: harmony
Node version: 18.16.0
npm / yarn version: v1.22.19

@GiladShoham
Copy link
Member

This API does not exist with bit 0.1.74.
Please try to upgrade to latest stable v0.2.24
Rename should also work now

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

No branches or pull requests

2 participants