Skip to content

PowerApps CLI script not found during pac code init execution #302

@megel

Description

@megel

Describe the bug
The pac code init command fails with a System.IO.FileNotFoundException stating "Could not find the PowerApps CLI script". The error occurs after successful authentication when the CLI attempts to locate and execute the PowerApps CLI script file.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to a directory (e.g., /workspaces/my-app-2)
  2. Run command: pac code init --displayName "My new App"
  3. Wait for authentication to complete successfully
  4. See error: "Could not find the PowerApps CLI script"

Expected behavior
The pac code init command should successfully initialize a new code project after authentication completes. The CLI should be able to locate and execute the required PowerApps CLI script to create the project structure.

Screenshots
N/A - Error captured in log file (pac-log.txt) see pac-log-sanitized.txt

Desktop (please complete the following information):

  • OS: Linux (Ubuntu 24.04.4 LTS in dev container)
  • CLI Tool: PowerApps CLI (pac)
  • Version: 2.5.1+gab954cf

Additional context

  • Environment: GitHub Codespace
  • Error Location: bolt.module.code.NodeCliManager.GetPowerAppsCliScript() at line 133
  • Authentication: Successfully completes using UNIVERSAL auth profile (User type)
  • Environment: Connected to [DEV] US Preview environment (https://....crm.dynamics.com/)
  • Timestamp: 2026-04-08 11:28:47-48 (first occurrence), 11:33:48-49 (second occurrence)
  • Exit Code: 1
  • Additional Note: libsecret keyring is not installed, falling back to plaintext cache (multiple warnings throughout log)
  • Stack Trace Summary: Error propagates through:
    • NodeCliManager.GetPowerAppsCliScript() → line 133
    • NodeCliManager.ExecuteNodeCommand() → line 29
    • InitVerb.ExecuteAsync() → line 124

The issue appears to be missing Node.js CLI script files required by the PAC tool's code module.

pac-log-sanitized.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions