Hi.
Just got a MacBook Air M1 yesterday, and wanted to see if I could get develop PCF Components on it.
When starting npm start watch, it threw some errors.
First error: Path not accepting undefined.
This was due to process.env.LOCALAPPDATA is not present on MAC.
in node_modules/pcf-scripts/taskRunner.js i added this after line 13: (I could not get this working in a .env file)
process.env.LOCALAPPDATA = process.env.HOME
after this, it still threw a error, this was a little harder to find, but managed to locate a line in
in node_modules/pcf-scripts/tasks/startTask.js line 34
const pcfStartCmd = child_process_1.spawn('cmd', ['/c', `pcf-start ${this._watchOn ? '--watch' : ''} --codePath ${outputDir}`]);
this has to be changed to:
const pcfStartCmd = child_process_1.spawn('pcf-start', [`${this._watchOn ? '--watch' : ''} --codePath ${outputDir}`]);
After this, it worked (test harness still not working)
I normally use Fiddler, so it is not a problem for me.
Fiddler Everywhere is supported on the M1 Chip, so I added the bundle.js to autoresponder, and it works.
There is massive performance boost on compile when changing a file compared to my Lenovo P15V.