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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / 'pcf-scripts' is not r...
Power Apps
Answered

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

(0) ShareShare
ReportReport
Posted on by 2,297

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
I have the same question (0)
  • skoofy5 Profile Picture
    482 on at

    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

     

  • WebPortal Profile Picture
    2,297 on at

    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.

  • Verified answer
    skoofy5 Profile Picture
    482 on at

    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'

     

  • sathishkannan Profile Picture
    5 on at

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

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard