cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WebPortal
Post Prodigy
Post Prodigy

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

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
1 ACCEPTED SOLUTION

Accepted Solutions

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...)

 

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

 

 'no-undef': 'off'

 

View solution in original post

3 REPLIES 3
skoofy5
Advocate V
Advocate V

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
Post Prodigy
Post Prodigy

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.

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...)

 

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

 

 'no-undef': 'off'

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Users online (1,896)