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 Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

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! […]

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

%d bloggers like this: