I encountered the error below upon running the "npm run build" command, and the nodemodules were installed via the "npm install" command. Despite attempting all the solutions provided in the reference, none have proven effective.
and it's working for other project from the same VS Code.
npm run build
> pcf-project@1.0.0 build Searching for availa> pcf-scripts build re \\nfcu.net\user\ho
'pcf-scripts' is not recognized as an internal or external command,
operable program or batch file.
Maybe install those dependencies first by running:
npm i -g
Also, make sure you're running the commands at the appropriate levels (i.e. if you're running from the wrong folders). See here - https://learn.microsoft.com/en-us/power-apps/developer/component-framework/create-custom-controls-using-pcf#create-a-new-component
Yes, My package.json has the below and ran the below command but didn't work.
npm i -g pcf-scripts
In your package.json you've got something like this?
"devDependencies": {
"pcf-scripts": "^1"
}
If not try installing pcf-script
npm i -g pcf-scripts
WarrenBelz
87
Most Valuable Professional
mmbr1606
71
Super User 2025 Season 1
Michael E. Gernaey
65
Super User 2025 Season 1