Skip to content

pac code add-data-source fails on macOS with spaces in path #1285

Closed

Description

The pac code add-data-source command fails on macOS when the VS Code extension installs pac CLI to the default location containing spaces: /Users/[username]/Library/Application Support/...

Node.js cannot parse the path correctly and throws "Cannot find module '/Users/[username]/Library/Application'" (truncated at the space).

Steps to Reproduce:

  1. Install Power Platform Tools VS Code extension on macOS
  2. Navigate to a Power Apps Code App project
  3. Run: pac code add-data-source -a shared_commondataserviceforapps -c [connectionId] -t task

Expected Behavior:
Command executes successfully and adds the data source to the project.

Actual Behavior:
Command fails with error: "Cannot find module '/Users/[username]/Library/Application'"

Environment:

  • OS: macOS (Sonoma/Sequoia)
  • pac CLI: Version 1.51.1 (via VS Code extension)
  • Node.js: v24.2.0
  • VS Code: 1.107.0 (Universal)
  • Extension: Power Platform Tools

Workaround:
Run the command on Windows and copy the generated files to macOS.

Root Cause:
The path /Users/[username]/Library/Application Support/ contains a space, which Node.js fails to handle properly when the VS Code extension invokes pac CLI.

Activity

  1. Brank commented on Feb 7, 2026

    @Brank

    I'm having the same issue, with the same error message

  2. petrochuk commented on Feb 8, 2026

    @petrochuk
    Contributor

    Thank you for reporting. This is going to be fixed in next version of PAC CLI. Also, there is a dedicated PowerAppsCodeApps repo where ou can bring up issues and discussions.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions