DEV Community

loading...
Cover image for A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors

A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors

Eli H. Schei
Senior front-end developer who mainly work in the Microsoft 365 -sphere. 👩🏻‍💻 Sharing the things I know, and the things I’m learning. I also like to draw ✍🏻
Originally published at elischei.com ・2 min read

In the first part of this series I gave an introduction to setup, test and deployment of PCF components. And the plan was that the next part should be about the actual coding of a PCF component.

But after talking with some of my coworkers I realised that we all came across a lot of the same problems/errors, and as a newbie it can be hard to know where to start when looking for a solution. Therefore I decided that this second part should be about common problems/errors that you can come accross when developing a PCF component. I will update this post as I encounter more problems/errors (as I’m sure I will).

Property does not exist on type IInputs

Alt Text
Problem: When you add a new property to your manifest file the TypeScript-type will not be generatet until you run npm run build. So if you try using the property in your code before that you will get the error “Property ‘propertyname’ does not exist on IInputs.

Solution: run npm run build

Error: Building temporary solution wrapper: failed.

Problem: You try to run pac pcf push to test your solution, and you get the Error: Building temporary solution failed.
Alt Text
Possible solution 1:
The first thing I do is to do a npm run build. And in most cases there is some small compilation error in my code, like ” expecting a ; ..” , and after fixing these errors I can run pac pcf push again with no errors.

Possible solution 2:
If the npm build does not return any errors I take a look in the obj\build.log file.

One error that showed up was problems with loading nuget packages.
Alt Text
Since this error showed up right after I had cloned and setup a .NET project in Visual Studio I figured it must be that msbuild (which is used by pac pcf push) tries to use all the packages that are referenced in “Package source”.

And sure enough when I went into VS2019 and unselected the private packages I was again able to run pac pcf push without errors. To find these settings go in Visual Studio –> Tools –> Nuget Package manager –> Package Manager settings. And select “Package sources” as shown in the image below.
Alt Text
Unselect the packages that require additional login.


I hope you found this article useful. If you have any feedback or questions please let me know in the comments below. 🙂

Thank you for reading, and happy coding!

/Eli

Discussion (0)