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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Error while using NPM start to use test harness for PCF control

(1) ShareShare
ReportReport
Posted on by 165

Hi All,

I am trying to build a sample PCF control, I have installed the latest Node.js and power apps CLI. When I am using the npm start command to open the Test harness, I am getting the below error. I have tried reinstalling the CLI and Node.js but still getting the same error.

Any kind of help will be much appreciated. Thanks in advance!

pastedimage1641777475138v1.png

I have the same question (0)
  • Nitin Meria Profile Picture
    216 on at

    Hi Sahil, even I am facing the same error. Did you get any resolution for this?

  • Sahil Profile Picture
    165 on at

    Hi Nitin, I didn't find any resolution yet. I have opened a ticket with MS for the same and haven't received any fruitful response yet.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    It seems that the latest PowerApps CLI breaks it. Everything worked fine before I installed the latest version.

  • Sahil Profile Picture
    165 on at

    CLI might be having some issues. I have a ticket opened with MS, waiting to hear back from them.

  • Nitin Meria Profile Picture
    216 on at

    Okay, please do post the solution here if you get any from MS. Meanwhile I too have opened a ticket with them and will post here if they help.

  • Verified answer
    David Jenni Profile Picture
    on at

    There was global confusion yesterday when the colors npm package received a rogue update, causing the weird output. The colors package is currently used by pcf-start v1.10.4 as one of the dependencies of the live-server npm package used to refresh the loaded PCF test harness. More info on the issue is here: github.com/.../317

    The package owners have since removed the offending change, so re-running npm install should work, see below.

    To recover your PCF controls projects, either:

    - pin to a known good version of the colors package:

    > npm install -D colors@1.4.0

    - or: clear node_modules and rebuild it:

     - delete folder node_modules

     - delete package-lock.json

     - npm install

    Note that in the next coming monthly refresh of our PCF tooling (pcf-scripts and pcf-start), we already replaced live-server, although for different reasons: it was the cause of many warnings we all saw when running npm install. The live-server package seems no longer to receive code updates, hence we moved away from it

  • Sahil Profile Picture
    165 on at

    Hi,

    I had a call with MS and the MS engineer tried to create a new PCF control on his system after following the steps mentioned here - "docs.microsoft.com/.../1-create-code-component", it worked fine for him. So I created a couple of new PCF control projects to check if it works for me and the npm start command worked this time and it opened the test harness successfully. However, the test harness still doesn't work for the other PCF projects for which I received the error originally.

    Please try creating a new control and check if it works for you now. As David mentioned, it might be because of the update made to the npm package that has been fixed now.

  • Sahil Profile Picture
    165 on at

    Hi David,

    Thanks for sharing the details!

    I just executed the command "npm install -D colors@1.4.0" as suggested by you for the control that was throwing error and the test harness opened fine now.

  • Nitin Meria Profile Picture
    216 on at

    Thank you Sahil and David, issue is resolved for me too!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans