Friday, December 11, 2020

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.

As on Oct 14, 2021, the supported version of Node JS is "14.18.1 LTS".

Sometimes, v14 throws issue of Saas when using gulp serve. In such case, you need to downgrade the node js version to 12. The same can be downloaded from here.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.