Questions tagged [gulp]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
5k views

SPFX Gulp Serve for a wepart is not opening workbench

I'm trying to add a webpart through SPFX here but when i write Gulp Serve it's not loading the workbench.aspx. Instead, it's trying to load a contoso.sharepoint page and the page is not opening. Any ...
Dheeraj Balamoori's user avatar
3 votes
1 answer
5k views

Command Gulp Serve with server configuration

When I generate a spfx webpart/extension, i see this file generated (./config/serve.json) : { "$schema": "https://dev.office.com/json-schemas/core-build/serve.schema.json", "port": 4321, "...
Guillaume Kiz's user avatar
3 votes
2 answers
3k views

SharePoint Framework Deployment error: failed to load URL from CDN

Background: I occasionally have all instances of a webpart fail after deploying a change. The webpart was recently built using the latest SharePoint framework. The gulp trust-dev-cert command was run....
Eric N Jochens's user avatar
3 votes
1 answer
813 views

SPFx - This site can’t be reached after running gulp serve

Any one with the solution to the follow error ? Zero edit since yo @microsoft/sharepoint then gulp serve The following page error opens : Runing on node 6.12 . with the following installed : ├...
LifterCoder's user avatar
2 votes
2 answers
3k views

Workbench issues with spfx 18.2 and react 16.8.4

I have recently updated a number of modern spfx webparts to spfx 18.2 and this morning when I try to debug in workbench (locally and on tenant) I am getting serve errors in relation to react and react-...
Allan MacRitchie's user avatar
2 votes
2 answers
245 views

how gulp serve related to sharepoint spfx webpart

I have created the sample spfx solution and uploaded it into the app catalog and i have added it to the site page. if I am changing in the local code and if I run the gulp serve the actual changes are ...
PGP's user avatar
  • 1,115
2 votes
1 answer
2k views

SharePoint workbench not reflecting changes

I'm building a SharePoint SPFx react web app. I've been using workbench for the last few weeks and it's been great. However, today when I did gulp serve I noticed that my changes are no longer being ...
hisusu32's user avatar
2 votes
1 answer
2k views

Angular 6 and Sharepoint SPFX

Just wondering if anyone has any samples or links to instructions for running an angular 6 app on Sharepoint SPFX. I have followed this example for Angular 5 but it will not work once I upgrade the ...
Damien's user avatar
  • 121
2 votes
1 answer
1k views

Can't run "gulp trust-dev-cert". Error "cannot read "tostring" of null"

I am trying to build up a react web part for SharePoint, and I was following the instructions from Microsoft page : https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-...
Raul Pontes's user avatar
1 vote
5 answers
16k views

Local gulp not found when executing gulp serve

I have downloaded the spfx samples from github and I am running into this problem when I execute gulp serve. λ gulp serve [12:39:37] Local gulp not found in C:\react-todo-basic [12:39:37] Try running:...
Burre Ifort's user avatar
  • 1,318
1 vote
1 answer
2k views

AssesrtionError: Task never defined : clean; on gulp version 4

I have recently migrated from gulp 3 to gulp 4 in SPFx 1.13.1 project. Previously I had SPFx 1.10 and gulp 3.9.1 version. After migration when I did run Yarn dist I got an error because I was using ...
sarbashis's user avatar
1 vote
1 answer
1k views

SPFX webpart not added to site after deployment

I have developed a SPFx WebPart using react. When packaging this solution, I use the following commands: gulp clean gulp bundle --ship gulp package-solution --ship FYI, I'm using these options in my ...
Jason Eades's user avatar
1 vote
1 answer
2k views

Failed to load component

I've been having a problem with Web Parts. I created this webpart and it works perfectly fine in the workbench, but when I tried to deploy it I received this error. I've tried gulp clean and ...
Arne Boedt's user avatar
1 vote
1 answer
431 views

Copied project "product ID" fault in app catalogue

I have an web part that I have copiedto two examples and modified the other one. However, when I try to upload them both to an app catalogue I get an error (the same product ID exists for the second ...
SharePointPnP's user avatar
1 vote
0 answers
166 views

Error - [tsc] node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.d.ts(13,35): error TS1005: ';' expected

I am trying to develop this SPFX inside our SharePoint online site @ Model pop up in SPFX Where I did the following steps, but I got the below errors:- Your environment has been set up for using Node....
John John's user avatar
1 vote
1 answer
1k views

SPFx - React component fail to load on site page

I was trying to import and using react component from: https://www.npmjs.com/package/react-calendar-timeline It is just rendering normal on workbench: When I try to bundle and deploy to site page it ...
Duong Vo 's user avatar
1 vote
2 answers
2k views

gulp trust-dev-cert gives the error: ReferenceError: primordials is not defined

I'm setting up a development environment for SP2019. I've installed; Node.js 14.15.0 gulp CLI 2.3.0 and Local 3.9.1 yeoman 4.3.0 @microsoft/generator-sharepoint 1.12.1 Once I've started my new ...
Sideburnt's user avatar
1 vote
1 answer
151 views

Configuring Dev environment for SP2016,SP2019 on prem and M365

I have several clients who are needing to migrate from SP2016 to SP2019 over the next 2 months. We will be setting up a hybrid environment for these clients where Intranet & Extranet requirements ...
Sean Achim's user avatar
1 vote
0 answers
239 views

Running SPFx gulp bundle in Docker container takes extremely long to start - why?

I'm running SPFx builds in a Docker container which works well. The approach is described here: https://github.com/waldekmastykarz/docker-spfx I'm using WSL2 and Ubuntu. But unfortunately running gulp ...
Heinrich Ulbricht's user avatar
1 vote
2 answers
785 views

Error after installing the SPFx environment for the first time

Got a following error after installing the SPFx environment for the first time any help would be helpful. Thanks in Advance.
user2915027's user avatar
1 vote
1 answer
3k views

SharePoint SPFx webpart - gulp trust-dev-cert Error

i try to create a webpart using SPFX: after running successfully : yo @microsoft/sharepoint Gulp version: gulp -v CLI version 2.1.0 Local version 3.9.1 node version: v10.15.3 i run : gulp ...
Imen Turki's user avatar
  • 2,183
1 vote
1 answer
401 views

What do i need to do for gulp serve to work? On Windows 7 64 bit gulp serve raises error in module.js:549

So this below is the output from running gulp serve - what do I need to do to get it running? M:\>gulp serve module.js:549 throw err; ^ Error: Cannot find module '@microsoft/sp-build-web' ...
SteveH's user avatar
  • 11
0 votes
2 answers
2k views

Easiest way to redeploy an SPFX extension

I've successfully deployed my first SharePoint Framework extension to my SharePoint Online app catalog + site collection. My question is about deployment efficiency. Currently to deploy, I have to do ...
Michael Colbs's user avatar
0 votes
1 answer
673 views

"gulp serve --nobrowser" is raising this error "Task never defined: serve"

I am trying to run this command for my SPFx gulp serve --nobrowser,, but i am getting this error:- C:\Windows\System32>d: D:\>cd D:\Systems D:\Systems>gulp serve --nobrowser [13:23:37] ...
John John's user avatar
0 votes
2 answers
5k views

How to stop gulp serve / workbench?

I just started my first SPFx project on SharePoint 2016. After I key in gulp serve the workbench prompt up. My question is, how to exit the workbench? In my DOS prompt it seems gulp is still ...
Mark L's user avatar
  • 4,070
0 votes
1 answer
610 views

"gulp serve" is returning this error "Cannot GET /temp/workbench.html" when open "https://localhost:4321/temp/workbench.html"

I want to create an SPFx web part, so i run these commands:- yo @microsoft/sharepoint gulp serve then when i try to run gulp serve, i got this error:- Cannot GET /temp/workbench.html here is the ...
John John's user avatar
0 votes
1 answer
946 views

"gulp serve" will return this error "ReferenceError: primordials is not defined"

I have 2 versions of node.js, as follow:- Your environment has been set up for using Node.js 17.1.0 (x64) and npm. C:\Windows\System32>nvm list 16.13.0 8.16.2 Now i am trying to run gulp ...
John John's user avatar
0 votes
1 answer
3k views

gulp build is raising this Error - [tslint] Error: Cannot find module '@microsoft/rush-stack-compiler-3.2'

I want to install this web part from hhttps://github.com/AsishP/SPFxWebParts , but when i run this command gulp build i got this error Error - [tslint] Error: Cannot find module '@microsoft/rush-stack-...
John John's user avatar
0 votes
1 answer
209 views

gulp serve error

When run gulp serve I am getting below error I am using below packages I found on internet that if you are using node 12 and gulp 3 then it will have above issue but I am having node 12 and gulp 4, ...
Milind's user avatar
  • 1,538
0 votes
1 answer
1k views

SPFx - Gulp serve fails

I had 2 webparts in my solution. But when i tried to add the 3rd webpart, it successfully adds. But after that "gulp serve" fails. Below is the error message D:\Bloom\Code\BloomWebparts>gulp serve ...
CHANDRU D's user avatar
0 votes
1 answer
323 views

How to analyze SPFx bundle content?

I know there is webpack-bundle-size-analyzer for visualizing and analyzing bundle sizes with webpack projects but how do I integrate it (or something similar) to SPFx web part or SPFx extension ...
Kaarlo Räihä's user avatar
0 votes
0 answers
36 views

SPFx gulp trust-dev-cert Error

I am getting following error after running 'gulp trust-dev' in SPFx: PS C:\Users\s.framework\Code\ZEN> gulp trust-dev-cert Build target: DEBUG [15:11:11] Using gulpfile ~\Code\ZEN\gulpfile.js [15:...
Nemanja Sovic's user avatar
0 votes
0 answers
813 views

Web part is not available in hosted workbench despite gulp serve running OK

I spent already whole day googling and trying to implement googled solutions but nothing worked so far... (and yes - I tried many solutions recommended from threads I found here on stackexchange) ...
Sasha Warchoon's user avatar
0 votes
1 answer
943 views

SPLoaderError.loadComponentError Sharepoint

I am trying to learn SPFx. I use SharePoint 2019. When I run "gulp serve", I found : Something went wrong If the problem persists, contact the site administrator and give them the ...
21_Muhammad Dicky Prasetyo's user avatar
0 votes
3 answers
3k views

Error: "Cannot read property apply of undefined" while running gulp commands for SPFx webpart

I am trying to do a sample webpart. While running any of the below commands, it is showing the same error as shown in the image: gulp trust-dev-cert gulp serve gulp build Can anyone help me on this ...
Swetha's user avatar
  • 377
0 votes
0 answers
3k views

Gulp bundle --ship: The build failed because a task wrote output to stderr error

I'm building a SharePoint SPFx and randomly when running gulp bundle --ship I get the following error: The build failed because a task wrote output to stderr. Exiting with exit code: 1 I saw this ...
hisusu32's user avatar
0 votes
2 answers
1k views

SPFX ClientSideAssets folder and dist folders have old code

When I build my solution, minified JS files have my old lines. Here are my steps: 1 - gulp clean 2 - gulp build 3 - gulp bundle 4 - gulp package-solution --ship file under \dist\test-web-part.js file ...
Aslan's user avatar
  • 532
0 votes
1 answer
665 views

Installing Yeoman generator fails with Node 10.18.1

This evening I thought I would update my SPFx Dev Toolchain: install latest Node 10.xx LTS (using NVM as recommended by AC or David Warner MVPs) Better Node.js Install Management with Node Version ...
westerdaled's user avatar
0 votes
1 answer
250 views

SharePoint Framework v1.1.0 requirement

I want to build my first spfx page on our SP2016 on-premise environment. Could you advice what is the requirement? I mentioned v1.1.0 because later version are not supported by SP2016 according to ...
Mark L's user avatar
  • 4,070
0 votes
0 answers
46 views

SPFx Solution has a warning stopping production builds has anyone seen it before?

I have been supporting an SPFx solution and I am required to make a small change however it will no longer build. I have tried pulling the last version back down from our repository but it has the ...
Yeti Byte's user avatar
0 votes
1 answer
3k views

All of sudden gulp command not recognizing

I made windows update on this Sunday. From that point, I am not able to execute gulp commands. I am not sure if there is any relation between windows update and gulp command. I am getting below error. ...
Mihir's user avatar
  • 1,546
0 votes
0 answers
142 views

spfx how to minify files for own CDN

Original question was, whether is it possible to somehow extend the webpack/gulp inside of spfx solution to have an extra task to minify some js files supposed to move to Office365 CDN? I would need ...
rychlmoj's user avatar
  • 239
0 votes
1 answer
66 views

Issue when debug and publish an extension created with SharePoint Framework Version 1.7 on a SharePoint Server 2019

I create an extension with SharePoint Framework 1.7 with yo @microsoft/sharepoint by selecting the options as indicated below: SharePoint 2019 onwards, including SharePoint Online. Use the current ...
Alvaro Villalba's user avatar
0 votes
2 answers
581 views

Handlebars with spfx, Module not found

I am trying to use handlebars in a client webpart using these posts: https://n8d.at/blog/how-to-use-handlebars-in-sharepoint-framework-projects-spfx/ https://n8d.at/blog/first-handlebars-web-part-in-...
Brittany Rutherford's user avatar
0 votes
1 answer
267 views

Error implementing custom SPfx App

I have a problem implementing my share-point SPfx app to the share-point site of my organisation. I followed the instructions provided by microsoft at https://docs.microsoft.com/en-us/sharepoint/dev/...
Tim Smeets's user avatar
0 votes
0 answers
752 views

SPfx gulp-serve command not launching the browser page in local host

I have created HelloWorld web part from this tutorial. The command yo @microsoft/sharepoint and gulp trust-dev-cert executed successfully. After that, I executed gulp serve command which shows below ...
users1100's user avatar
  • 3,230