SPFx Web part: Common Errors & Solutions while executing gulp serve

Manimekalai
 
Technology Specialist
March 12, 2018
 
Rate this article
 
Views
3992

You might have challenges while executing the gulp serve command. The common errors and solutions are provided in this article

Error 1: Gulp is not recognized

Solution:

Please execute the below commands in your Node.js command prompt window to resolve the issue

  • npm install -g gulp
  • npm install –save-dev gulp

 

Error 2: Missing Node-SASS

Error – [sass] Error: Missing binding C:\XXX\YYYY/Documents\SPFx\Projects\documentcardexample-webpart\node_modules\node-sass\vendor\win32-x64-46\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 4.x

Found bindings for the following environments:

• Windows 32-bit with Node.js 4.x

Solution:

  • This usually happens because your environment has changed since running npm install.
  • Run npm rebuild node-sass to build the binding for your current environment.

Error 3: Cannot find Node Module

Cannot find module <Module_name>

Solution:

npm install <module_name> –save

Eg:

  • Npm install moment-timezone –save
  • Npm install @types/moment –save
  • Npm install @types/moment-timezone –save

clip_image002

Error 4: Cannot find module jquery

Solution:

Try using npm to install the typings

  • npm install jquery –save

Error 5: Cannot find module react-slick/dist/react-slick

Solution:

Try using npm to install the typings

  • npm install react-slick
Category : SharePoint, SPFx

Author Info

Manimekalai
 
Technology Specialist
 
Rate this article
 
Having 6 years of experience in design and development of SharePoint applications, Mani has expertise in developing applications using Office 365, SharePoint 2013 & 2010, SPFX, SP Designer Workflows, Visual ...read more
 

Leave a comment