here is the command I executed: yo @microsoft/sharepoint

At the end of the execution of this command I reach the expected result despite having encountered these errors or I wonder if these errors can really cause problems after ?? enter image description here


Run the gulp serve command, if your web part gets rendered, then no issues with this error. If it doesn't get rendered, try running the npm install node-sass -g command. Then subsequently keep follow the command in the screen for any errors, this is the beauty of the SPFx, the developer will be instructed in the screen what to do for the errors.

The error comes from node-sass module installation, so run the below command:

npm install node-sass -g

Actually, the above errors come from node_models where some of the files didn't get added properly.

One more workaround is, develop just hello world web part or download from the Github... then for any upcoming SPFx project just replace the node_models folder with the working one.


If the above command does not fix your issue - you can download the node-sass.zip file from this location:


Extract the zip file, you will get a folder node-sass

Then go to your project file path like below:

"Your Project Path"\node_modules



node-sass folder path under the node_modules

Rename the existing "node-sass" as node-sass2 then copy the downloaded node-sass folder and paste here (or even you can replace the existing node-sass folder)

Then, finally, run the gulp serve command again to see whether the web part renders properly without any errors.

For sample SPFx web part tutorial you may refer to the below articles:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.