Skip to main content
Community site session details

Community site session details

Session Id : LH+Z3hmk4oVh52U0vW9Dry
Power Apps - Power Apps Pro Dev & ISV
Answered

'pcf-scripts' is not recognized as an internal or external command

Like (0) ShareShare
ReportReport
Posted on 24 Nov 2022 15:55:52 by 2,278

I have the following installed on Windows 11:

 

 

Upon bulding a power apps code component with

 

 

npm run build

 

 

I get the error:

 

> numberbuttonselector@1.0.0 build
> pcf-scripts build

'pcf-scripts' is not recognized as an internal or external command,
operable program or batch file.

 

I also tried:

 

npm i -g
  • sathishkannan Profile Picture
    5 on 07 Mar 2024 at 04:00:26
    Re: 'pcf-scripts' is not recognized as an internal or external command

    finally... after spending 5 hrs.... fixed this issue... thanks 

  • Verified answer
    skoofy5 Profile Picture
    480 on 25 Nov 2022 at 12:32:39
    Re: 'pcf-scripts' is not recognized as an internal or external command

    Because it's typescript you should probably just turn off the no-undef rule (see here: https://typescript-eslint.io/docs/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors)

     

    Add this to you eslintrc.json file under your "no-unused-vars" rule.

     

     'no-undef': 'off'

     

  • WebPortal Profile Picture
    2,278 on 25 Nov 2022 at 08:22:20
    Re: 'pcf-scripts' is not recognized as an internal or external command

    Hi @skoofy5

     

    Thanks for helping. I am trying to install a code component.

     

    fter many hours of hair-pulling, I'm now trying to install this component.

     

    Specifically, NumberButtonSelector.

     

    I just want to install it, I don't even dream of developing one myself.

     

    Steps:

    1- Created NumberButtonSelector folder

    2- Opened foder with VSCode

    3- Ran pac pcf init --namespace Nuno --name NumberButtonSelector --template field

    4- Downloaded code from NumberButtonSelector into NumberButtonSelector/NumberButtonSelector folder

    5- Ran npm install

    6- Ran npm run build

    7- Got the error "no-used-vars" which I've fixed as per your post

    8- Now, I'm getting the error:

     

     

    C:\Users\nuno_\Documents\NumberButtonSelector>cd NumberButtonSelector
    
    [22:58:42] [build] Validating control...
    [22:58:43] [build] Running ESLint...
    [22:58:44] [build] Failed:
    [pcf-1065] [Error] ESLint validation error:
    C:\Users\nuno_\Documents\NumberButtonSelector\NumberButtonSelector\index.ts
     2:10 warning 'debug' is defined but never used no-unused-vars
     3:10 warning 'timingSafeEqual' is defined but never used no-unused-vars
     29:24 error 'EventListenerOrEventListenerObject' is not defined no-undef
     30:22 error 'EventListenerOrEventListenerObject' is not defined no-undef
     31:22 error 'EventListenerOrEventListenerObject' is not defined no-undef
    
    âś– 5 problems (3 errors, 2 warnings)

     

     

    So now the error is on NumberButtonSelector\NumberButtonSelector\index.ts

     

    You may see this post also.

  • skoofy5 Profile Picture
    480 on 25 Nov 2022 at 00:59:02
    Re: 'pcf-scripts' is not recognized as an internal or external command

    So you've done a global instead of a local?

    So you ran:

    pac pcf init --namespace [ControlNameSpace] --name [ControlName] --template [dataset OR field]

    And then just:

    npm install

     

    Before you tried to build?

     

    skoofy5_0-1669337931740.png

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete