Skip to content

npx create-nx-workspace produces error.log file #34482

Description

@Den-dp

Current Behavior

npx create-nx-workspace produces error.log file with 'gh' is not recognized error

Expected Behavior

No error.log files must be present in generated project

GitHub Repo

No response

Steps to Reproduce

  1. npx create-nx-workspace@22.5.1 nx2251emptytemplate --template nrwl/empty-template
  2. cat nx2251emptytemplate/error.log

Nx Report

Node           : 22.21.1
OS             : win32-x64
Native Target  : x86_64-windows
npm            : 10.9.4
daemon         : Available

nx (global)    : 22.5.1
nx             : 22.5.0
@nx/js         : 22.5.0
@nx/workspace  : 22.5.0
@nx/devkit     : 22.5.0
typescript     : 5.9.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
---------------------------------------
Cache Usage: 0.00 B / 47.41 GB

Failure Logs

> npx create-nx-workspace@22.5.1 nx2251emptytemplate --template nrwl/empty-template

 NX   Let's create a new workspace [https://nx.dev/getting-started/intro]


 NX   Creating your v22.5.1 workspace.

✔ Successfully created the workspace: C:\temp\nx2251emptytemplate

 NX   Could not push.


+----------------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                                                                                    |
|   Finish your set up here: https://cloud.nx.app/setup/connect-workspace/manual?accessToken=undefined&source=create-nx-workspace-success-ci-setup   |
|                                                                                                                                                    |
+----------------------------------------------------------------------------------------------------------------------------------------------------+



> cat nx2251emptytemplate/error.log

'gh' is not recognized as an internal or external command,
operable program or batch file.

Package Manager Version

No response

Operating System

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

Additional Information

No response

Activity

  1. added theissue type on Feb 17, 2026
  2. added
    communityThis is a good first issue for contributing
    and removed on Mar 14, 2026
  3. FrozenPandaz commented on Mar 24, 2026

    @FrozenPandaz
    Contributor

    The error.log file is created by execAndWait() in packages/create-nx-workspace/src/utils/child-process-utils.ts (lines 61-62). Every time any command fails, it writes stdout+stderr to error.log in the CWD. When gh isn't installed, the GitHub push flow calls execAndWait('gh api user...') which fails and creates this file.

    The cleanest fix would be to add an option to execAndWait (e.g., skipErrorLog: boolean) and pass it when running gh commands that can fail gracefully. Alternatively, the error.log file could be cleaned up after workspace creation.

  4. added 2 commits that reference this issue on Mar 25, 2026
    96537f8
    e284c7b
  5. github-actions commented on Apr 25, 2026

    @github-actions
    Contributor

    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.

  6. locked as resolved and limited conversation to collaborators on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

communityThis is a good first issue for contributingoutdatedpriority: mediumMedium Priority (not high, not low priority)scope: corecore nx functionalitytype: bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions