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


Manimekalai
Technology Specialist
Published On :   12 Mar 2018
Visit Count
Today :  2    Total :   643



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
Categories