React JS – Resolving error while using Fluent UI web components – npm ERR! cb() never called!

React JS - error - "npm ERR! cb() never called!" while installing Fluent Web UI components
React JS - error - "npm ERR! cb() never called!" while installing Fluent Web UI components

Hi All,

Greetings for the day !!

Today new issue and resolution ! Short article but useful for REACT / SPFx developers

Background

  • In my current project I got an opportunity to implement the SPFx component
  • We are implementing SPFx project using REACT
  • So started refreshing my REACT skills
  • I started exploring Fluent UI web components using REACT so started installing Fluent UI web component using npm as

npm install --save @fluentui/web-components

While executing the above error we are getting an below error

Issue

npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!
https://npm.community

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Roaming\npm-cache_logs\2022-03-21T10_06_23_503Z-debug.log

React JS - error - "npm ERR! cb() never called!" while installing Fluent Web UI components
Fig : React JS – error – “npm ERR! cb() never called!” while installing Fluent Web UI components

Solution

Just we need to clear the cache. Need to execute following commands

npm cache clean --force 

NPM - cleaning the cache
Fig : NPM – cleaning the cache

What is npm cache. why its necessary to clean timely basis, I am coming with next article, please stay tuned, will share soon.

After cleaning the cache, tried to install the components again and those get successfully installed

 npm install --save @fluentui/web-components

React app - installed React Fluent Web UI components
Fig : React app – installed React Fluent Web UI components

Thanks for reading ! share your experience in case related to this error !

HAVE A GREAT TIME AHEAD !! LIFE IS BEAUTIFUL 🙂

Prasham Sabadra

LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

You may also like...

1 Response

  1. April 21, 2022

    […] In first article we discussed how to resolve this error. React JS – Resolving error while using Fluent UI web components – npm ERR! cb() never called! […]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Microsoft 365

Subscribe now to keep reading and get access to the full archive.

Continue reading