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 / Cannot build react com...
Power Apps
Answered

Cannot build react component due to 401 unauthorised error when installing the react npm packages

(1) ShareShare
ReportReport
Posted on by 1,400

So I'm trying to build the new ts_reactstandardcomponent demo and I'm getting the following error message

 

pm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\BenThompson\AppData\Roaming\npm-cache\_logs\2019-06-20T07_04_34_355Z-debug.log

C:\Users\BenThompson\Downloads\SamplePCFControls\TS_ReactStandardControl>npm install react react-dom office-ui-fabric-react
npm ERR! code E401
npm ERR! 401 Unauthorized: office-ui-fabric-react@^6.189.0

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\BenThompson\AppData\Roaming\npm-cache\_logs\2019-06-20T07_23_55_603Z-debug.log

C:\Users\BenThompson\Downloads\SamplePCFControls\TS_ReactStandardControl>npm install
npm ERR! code E401
npm ERR! 401 Unauthorized: office-ui-fabric-react@^6.189.0

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\BenThompson\AppData\Roaming\npm-cache\_logs\2019-06-20T07_24_27_955Z-debug.log

C:\Users\BenThompson\Downloads\SamplePCFControls\TS_ReactStandardControl>

Full logfile is 

 

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'react',
1 verbose cli 'react-dom',
1 verbose cli 'office-ui-fabric-react' ]
2 info using npm@6.4.1
3 info using node@v10.15.3
4 verbose npm-session 394f7b0df66c0a71
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 401 https://msazure.pkgs.visualstudio.com/_packaging/CAP_ISVExp_Tools_Internal/npm/registry/office-ui-fabric-react 425ms
8 silly fetchPackageMetaData error for office-ui-fabric-react@^6.189.0 401 Unauthorized: office-ui-fabric-react@^6.189.0
9 http fetch GET 401 https://msazure.pkgs.visualstudio.com/_packaging/CAP_ISVExp_Tools_Internal/npm/registry/react-dom 648ms
10 silly fetchPackageMetaData error for react-dom@^16.8.6 401 Unauthorized: react-dom@^16.8.6
11 http fetch GET 401 https://msazure.pkgs.visualstudio.com/_packaging/CAP_ISVExp_Tools_Internal/npm/registry/react 801ms
12 silly fetchPackageMetaData error for react@^16.8.6 401 Unauthorized: react@^16.8.6
13 timing stage:rollbackFailedOptional Completed in 5ms
14 timing stage:runTopLevelLifecycles Completed in 1045ms
15 verbose stack Error: 401 Unauthorized: office-ui-fabric-react@^6.189.0
15 verbose stack at fetch.then.res (C:\Program Files\nodejs\node_modules\npm\node_modules\pacote\lib\fetchers\registry\fetch.js:42:19)
15 verbose stack at tryCatcher (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
15 verbose stack at Promise._settlePromiseFromHandler (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
15 verbose stack at Promise._settlePromise (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
15 verbose stack at Promise._settlePromise0 (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
15 verbose stack at Promise._settlePromises (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
15 verbose stack at Async._drainQueue (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
15 verbose stack at Async._drainQueues (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
15 verbose stack at Immediate.Async.drainQueues [as _onImmediate] (C:\Program Files\nodejs\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
15 verbose stack at runCallback (timers.js:705:18)
15 verbose stack at tryOnImmediate (timers.js:676:5)
15 verbose stack at processImmediate (timers.js:658:5)
16 verbose cwd C:\Users\BenThompson\Downloads\SamplePCFControls\TS_ReactStandardControl
17 verbose Windows_NT 10.0.18362
18 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "react" "react-dom" "office-ui-fabric-react"
19 verbose node v10.15.3
20 verbose npm v6.4.1
21 error code E401
22 error 401 Unauthorized: office-ui-fabric-react@^6.189.0
23 verbose exit [ 1, true ]

Any ideas?

I have the same question (0)
  • indikaa Profile Picture
    31 on at

    Hi @BenJBauer , 

    I'm getting the same error, trying to create same application manually and see what happen.

  • Verified answer
    indikaa Profile Picture
    31 on at

    Hi @ben-thompson ,

    I have created a new project and used the code from the sample, then it worked.

  • Greg Hurlman (MSFT) Profile Picture
    Microsoft Employee on at

    If you delete the .npmrc file, the sample should work.

     

    Update: This has been resolved. A new, working version of the sample code can be found at https://aka.ms/pcfsamplecontrols.

  • Sheldon Copper Profile Picture
    200 on at
  • Ben Thompson Profile Picture
    1,400 on at

    The link is at the bottom of https://docs.microsoft.com/en-us/powerapps/developer/component-framework/sample-controls/react-facepile-control which has a walkthrough on what it does...

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
11manish Profile Picture

11manish 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard