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

chalk.bold is not a function error when running nx g @nx/angular:ng-add #26654

Closed
1 of 4 tasks
hakimio opened this issue Jun 24, 2024 · 1 comment · Fixed by #26667
Closed
1 of 4 tasks

chalk.bold is not a function error when running nx g @nx/angular:ng-add #26654

hakimio opened this issue Jun 24, 2024 · 1 comment · Fixed by #26667
Assignees
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@hakimio
Copy link

hakimio commented Jun 24, 2024

Current Behavior

yarn nx g @nx/angular:ng-add is throwing error: chalk.bold is not a function.

Stack trace:

TypeError: chalk.bold is not a function
    at getProjectValidationResultMessage (node_modules\@nx\angular\src\generators\ng-add\utilities\validation-logging.js:19:21)
    at LibMigrator.migrate (node_modules\@nx\angular\src\generators\ng-add\migrators\projects\project.migrator.js:47:76)
    at LibMigrator.migrate (node_modules\@nx\angular\src\generators\ng-add\migrators\projects\lib.migrator.js:22:21)
    at migrateFromAngularCli (node_modules\@nx\angular\src\generators\ng-add\migrate-from-angular-cli.js:39:24)
    at async ngAddGenerator (node_modules\@nx\angular\src\generators\ng-add\ng-add.js:6:12)
    at async node_modules\nx\src\command-line\generate\generate.js:241:26
    at async handleErrors (node_modules\nx\src\utils\params.js:9:24)
    at async Object.handler (node_modules\nx\src\command-line\generate\command-object.js:13:22)

Expected Behavior

No errors.

GitHub Repo

No response

Steps to Reproduce

  1. Run yarn nx g @nx/angular:ng-add

Nx Report

Node   : 20.13.1
OS     : win32-x64
yarn   : 4.3.0

nx (global)    : 16.8.1
nx             : 19.3.1
@nx/js         : 19.3.1
@nx/linter     : 19.3.1
@nx/eslint     : 19.3.1
@nx/workspace  : 19.3.1
@nx/angular    : 19.3.1
@nx/devkit     : 19.3.1
@nrwl/tao      : 19.3.1
@nx/web        : 19.3.1
@nx/webpack    : 19.3.1
typescript     : 5.4.5

Failure Logs

TypeError: chalk.bold is not a function
    at getProjectValidationResultMessage (node_modules\@nx\angular\src\generators\ng-add\utilities\validation-logging.js:19:21)
    at LibMigrator.migrate (node_modules\@nx\angular\src\generators\ng-add\migrators\projects\project.migrator.js:47:76)
    at LibMigrator.migrate (node_modules\@nx\angular\src\generators\ng-add\migrators\projects\lib.migrator.js:22:21)
    at migrateFromAngularCli (node_modules\@nx\angular\src\generators\ng-add\migrate-from-angular-cli.js:39:24)
    at async ngAddGenerator (node_modules\@nx\angular\src\generators\ng-add\ng-add.js:6:12)
    at async node_modules\nx\src\command-line\generate\generate.js:241:26
    at async handleErrors (node_modules\nx\src\utils\params.js:9:24)
    at async Object.handler (node_modules\nx\src\command-line\generate\command-object.js:13:22)

Package Manager Version

4.3.0

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Using yarn v4.3.0.

@leosvelperez leosvelperez added the scope: angular Issues related to Angular support in Nx label Jun 25, 2024
@leosvelperez leosvelperez self-assigned this Jun 25, 2024
FrozenPandaz pushed a commit that referenced this issue Jun 26, 2024
… ng-add generator (#26667)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26654

(cherry picked from commit 8872ca5)
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants