web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / pac pcf init - Unable ...
Power Apps
Unanswered

pac pcf init - Unable to run using npm start on MacOS

(0) ShareShare
ReportReport
Posted on by

I'm fairly new to MSPP but I've recently been working with the Component Framework on PC. I've since moved over to my Macbook but I'm unable to install the MSI for obvious reasons.

I have found however that there's a Visual Studio Code extension that provides the pac CLI tool, so I've gone ahead and installed then created a new component using the below:

pac pcf init --name Test1 --namespace HomeOffice --template dataset

I've then also installed typescript as this is also required, using npm i typescript --save-dev

Then I've build using npm run build. All fine so far however I'm unable to run it using npm start, instead I'm given the below error:

Does this tool work on MacOS or is the Component Framework only available for Windows?

npm start
Debugger attached.

> pcf-project@1.0.0 start /Users/martincrawley/Documents/Code/MSPowerPlatform/HeaderComponent/src2
> pcf-scripts start

Debugger attached.
[13:41:42] [start] Initializing...
[13:41:42] [start] Validating manifest...
[13:41:42] [start] Validating control...
[13:41:43] [start] Generating manifest types...
[13:41:43] [start] Generating design types...
[13:41:43] [start] Compiling and bundling control...
[Webpack stats]:
Hash: c481216b2d10813bae5f
Version: webpack 4.42.1
Time: 1439ms
Built at: 08/16/2021 13:41:45
Asset Size Chunks Chunk Names
bundle.js 6.24 KiB main [emitted] main
Entrypoint main = bundle.js
[./Test1/index.ts] 2.29 KiB {main} [built]
[13:41:45] [start] Generating build outputs...
[13:41:45] [start] Starting control harness...
Waiting for the debugger to disconnect...
events.js:291
throw er; // Unhandled 'error' event
^

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
at onErrorNT (internal/child_process.js:470:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'pcf-start --codePath out/controls/Test1' ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pcf-project@1.0.0 start: `pcf-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pcf-project@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/martincrawley/.npm/_logs/2021-08-16T12_41_45_485Z-debug.log
Waiting for the debugger to disconnect...

I have the same question (0)
  • microconsulting Profile Picture
    18 on at

    @MCrawley0 , 

     

    There is something wrong with your events.js file. Double-check how you're importing that file and also check if there are any errors in that file.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard