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

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 t…

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


Print Share Comment Cite Upload Translate
APA
Eli H. Schei | Sciencx (2024-03-28T23:41:19+00:00) » A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors. Retrieved from https://www.scien.cx/2021/05/18/a-beginners-guide-to-powerapps-component-framework-pcf-part-2-common-problems-errors/.
MLA
" » A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors." Eli H. Schei | Sciencx - Tuesday May 18, 2021, https://www.scien.cx/2021/05/18/a-beginners-guide-to-powerapps-component-framework-pcf-part-2-common-problems-errors/
HARVARD
Eli H. Schei | Sciencx Tuesday May 18, 2021 » A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors., viewed 2024-03-28T23:41:19+00:00,<https://www.scien.cx/2021/05/18/a-beginners-guide-to-powerapps-component-framework-pcf-part-2-common-problems-errors/>
VANCOUVER
Eli H. Schei | Sciencx - » A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors. [Internet]. [Accessed 2024-03-28T23:41:19+00:00]. Available from: https://www.scien.cx/2021/05/18/a-beginners-guide-to-powerapps-component-framework-pcf-part-2-common-problems-errors/
CHICAGO
" » A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors." Eli H. Schei | Sciencx - Accessed 2024-03-28T23:41:19+00:00. https://www.scien.cx/2021/05/18/a-beginners-guide-to-powerapps-component-framework-pcf-part-2-common-problems-errors/
IEEE
" » A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors." Eli H. Schei | Sciencx [Online]. Available: https://www.scien.cx/2021/05/18/a-beginners-guide-to-powerapps-component-framework-pcf-part-2-common-problems-errors/. [Accessed: 2024-03-28T23:41:19+00:00]
rf:citation
» A beginners guide to PowerApps Component Framework (PCF) – part 2: Common problems/errors | Eli H. Schei | Sciencx | https://www.scien.cx/2021/05/18/a-beginners-guide-to-powerapps-component-framework-pcf-part-2-common-problems-errors/ | 2024-03-28T23:41:19+00:00
https://github.com/addpipe/simple-recorderjs-demo