Search This Blog

Tuesday, February 23, 2021

SPFx Pre-requisites

Before start working on SPFx, we need to have some tools installed on our system. Below is a list of commands to uninstall/install these tools in sequence. There are 2 ways to make setup. EITHER we check each and every tools whether already installed or not and the install the remaining ones OR we uninstall all the required tools and then install back. Here, we are providing the uninstall and install commands. Choice is yours which path to follow.

Before starting the process, make sure, Node JS and npm are installed on your system. To verify, open 

command prompt. Change directory path to C:. Then execute below commands-

  1. node -v /* For Node Version */
  2. npm -v /* For NPM Version */














Uninstall Commands-

  1. npm uninstall -g chalk
  2. npm uninstall -g loadash
  3. npm uninstall -g lodash
  4. npm uninstall -g tar-fs
  5. npm uninstall -g update-notifier
  6. npm uninstall -g yeoman-generator
  7. npm uninstall -g yosay
  8. npm uninstall -g yo
  9. npm uninstall -g gulp
  10. npm rm -g gulp-cli
  11. npm uninstall -g @microsoft/generator-sharepoint


Install Commands-

  1. npm install -g chalk
  2. npm install -g loadash
  3. npm install -g lodash
  4. npm install -g tar-fs
  5. npm install -g update-notifier
  6. npm install -g yeoman-generator
  7. npm install -g yosay
  8. npm install -g yo
  9. npm install -g gulp
  10. npm install -g gulp-cli --force
  11. npm install -g @microsoft/generator-sharepoint
  12. npm install    gulp@next (if got error of primordials is not defined)
  13. npm install -g npm@latest


To install gulp locally in project directory, we use below command-

npm install --save-dev gulp /* Install gulp locally in project directory folder */


To list all npm installations-

npm ls -g --depth=0 /* List All npm Installations */


For more details, please refer Microsoft Website.

SharePoint Framework (SPFx)

According to microsoft-
The SharePoint Framework (SPFx) is a page and web part model that provides full support for client-side SharePoint development, easy integration with SharePoint data, and extending Microsoft Teams. With the SharePoint Framework, you can use modern web technologies and tools in your preferred development environment to build productive experiences and apps that are responsive and mobile-ready.

Key features of the SharePoint Framework include:

  • It runs in the context of the current user and connection in the browser. There are no iFrames for the customization (JavaScript is embedded directly to the page).
  • The controls are rendered in the normal page DOM.
  • The controls are responsive and accessible by nature.
  • It enables the developer to access the lifecycle in addition to renderloadserialize and de-serializeconfiguration changes, and more.
  • It's framework-agnostic. You can use any JavaScript framework that you like including, but not limited to, React, Handlebars, Knockout, Angular, and Vue.js.
  • The developer toolchain is based on popular open-source client development tools such as NPM, TypeScript, Yeoman, webpack, and gulp.
  • Performance is reliable.
  • End users can use SPFx client-side solutions that are approved by the tenant administrators (or their delegates) on all sites, including self-service team, group, or personal sites.
  • SPFx web parts can be added to both classic and modern pages.
  • SPFx solutions can be used to extend Microsoft Teams.