Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [gulp]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
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 ...
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. ...
2 votes
1 answer
124 views

While setting up a SPFx solution, getting node:path error

Node version - 12.22.12 Npm version - 6.14.16 SPFx version - 1.12.1 @microsoft/[email protected] After npm i, when running Gulp build, its giving error as: Error: Cannot find module 'node:...
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 ...
0 votes
0 answers
7 views

Unable to load webpart on workbench

I'm a relatively new beginner to SharePoint and building web parts; I was given access to the source code for a few custom-built SharePoint web parts, and I wanted to try running gulp serve to run ...
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 ...
0 votes
1 answer
135 views

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory - SPFX Solutionn Terminal error

When I try to run gulp serve command in the terminal, it works sometimes, but sometimes it throws some error like this, which I mentioned in the image below. And it takes more time to run, so can ...
0 votes
0 answers
46 views

The Yeoman Generator encounters a failure with the error message "Trying to copy from a source that does not exist."

I am trying to generate SharePoint Framework (SPFx) client-side web parts using the Yeoman SharePoint Generator, but it consistently presents the same error as detailed below. C:\Users\utkarsh>yo @...
0 votes
2 answers
158 views

How can I upgrade the TypeScript version in SharePoint 2019 Project?

I'm trying to use [email protected] and Fluent8 in a new SharePoint 2019 project When running, it shows some TypeScript syntax errors like this: ... Starting subtask 'tslint'... Starting subtask '...
0 votes
0 answers
204 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:...
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 ...
0 votes
0 answers
1k 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) ...
0 votes
1 answer
1k 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 ...
0 votes
1 answer
972 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] ...
1 vote
1 answer
3k 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 ...
0 votes
1 answer
880 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 ...
0 votes
1 answer
1k 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 ...
0 votes
1 answer
4k 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-...
1 vote
0 answers
191 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....
1 vote
1 answer
168 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 ...
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....
1 vote
1 answer
2k 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 ...
1 vote
0 answers
308 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 ...
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 ...
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 ...
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-...
2 votes
2 answers
263 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 ...
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 ...
0 votes
1 answer
750 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 ...
0 votes
1 answer
218 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, ...
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 ...
0 votes
1 answer
263 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 ...
0 votes
2 answers
616 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-...
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:...
0 votes
0 answers
76 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 ...
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-...
0 votes
0 answers
148 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 ...
1 vote
2 answers
834 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.
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 ...
0 votes
1 answer
81 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 ...
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 ...
1 vote
1 answer
537 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 ...
1 vote
1 answer
413 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' ...
0 votes
1 answer
286 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/...
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 ...
0 votes
1 answer
337 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 ...
3 votes
1 answer
833 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 : ├...
0 votes
2 answers
3k 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 ...
0 votes
0 answers
789 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 ...