Hot answers tagged

7 votes
Accepted

SPFX Gulp Serve for a wepart is not opening workbench

This is happening because your SPFx solution has an extension added to it. Whenever you add SPFx extension to the solution, after running the yeoman generator, it will modify the config > serve....
user avatar
  • 30.3k
4 votes
Accepted

Command Gulp Serve with server configuration

Yes, you can specify which gulp command to run as below: gulp serve --config=helloworld Its a new section which has been added to the serve.json config file in SPFx projects. So, when you run gulp ...
user avatar
  • 30.3k
3 votes

how gulp serve related to sharepoint spfx webpart

You probably ran the gulp tasks for bundling and packaging without the "--ship" flag at the end, so it still connects to your localhost after deployment You can find some guidance here: https://docs....
user avatar
3 votes

SharePoint Framework Deployment error: failed to load URL from CDN

I have changed my deployment steps: gulp clean --ship gulp build --ship gulp bundle --ship gulp package-solution --ship This has resolved the excessive number of js files in the /temp/deploy folder ...
user avatar
2 votes

Easiest way to redeploy an SPFX extension

This is what I've been doing: Increment the version number in the package-solution.json file Upload the new .sppkg and CDN files Go to "Add an App" and click "find out why" link on your app and then ...
user avatar
  • 21
2 votes

Local gulp not found when executing gulp serve

Hi here you go this should work, after you run bellow command: Step-1: npm install @microsoft/generator-sharepoint --save-dev you should run the following command: Step-2: yo @microsoft/...
user avatar
  • 1,019
2 votes

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

It sounds like your system may not be properly configured. The first step is to check to see which version of SPFx you have installed. You can do this by running npm list -g --depth=1 @microsoft/...
user avatar
  • 11.5k
2 votes

Workbench issues with spfx 18.2 and react 16.8.4

Insert 2 lines to your gulpfile.js 'use strict'; const path = require('path'); const gulp = require('gulp'); const build = require('@microsoft/sp-build-web'); build.addSuppression(`Warning - [sass] ...
user avatar
  • 21
1 vote

Workbench issues with spfx 18.2 and react 16.8.4

I guess the best thing to start is gulp clean Then gulp build and then gulp serve. Maybe these simple steps will help you to refresh all dependencies and get rid of outdated artifacts
user avatar
  • 139
1 vote
Accepted

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

From SPFx 1.13 release notes To configure the browser launch correctly, update the initialPage property within the ./config/serve.json to point to your SharePoint Online tenant. For example: https://...
user avatar
1 vote
Accepted

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

Before running gulp serve command, first make sure you successfully select a node version. When you run nvm list, make sure you have (Currently using 64-bit executable) next to the correct node ...
user avatar
1 vote
Accepted

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

This is a computability issue. SharePoint Framework (SPFx) 1.7.1 requires the following node.js LTS 8.x npm v5, v6 yeoman yo@3.1.1. (for creating new projects only) This is what you have. It won't ...
user avatar
1 vote

Failed to load component

Try increasing the version of your solution within package-solution.json to force an update when deployed, rebuild, generate a new package and deploy again. I had had an annoying experience before ...
user avatar
1 vote
Accepted

gulp serve error

Please refer the official document here: Set up your SharePoint Framework development environment Use Node.js v10.x. Install Yeoman and gulp: npm install -g yo gulp Install Yeoman SharePoint ...
user avatar
  • 2,493
1 vote

How to stop gulp serve / workbench?

I would recommend you to use Node JS command prompt for running commands related to SharePoint Framework. And to stop the execution: Close both the local and hosted workbench and stop the local ...
user avatar
  • 28.2k
1 vote

How to stop gulp serve / workbench?

Ctrl +c should stop it as per the documentation
user avatar
1 vote

SPFx - Gulp serve fails

It looks like your tslint.json file was modified unexpectedly. You can try to save your tslint.json before adding the third web part. Then add it and restore original tslint.json.
user avatar
1 vote

Angular 6 and Sharepoint SPFX

Besides the link mentioned in comments, you can also checkout the Angular Elements - hello world webpart which uses Angular 6 and SPFx. It is based on Angular Elements functionality which packages ...
user avatar
  • 30.3k
1 vote

Local gulp not found when executing gulp serve

Try running npm install --save-dev gulp instead of npm install --save-dev gulp-install
user avatar
1 vote

How to analyze SPFx bundle content?

The .sppkg file packaged by the SPFx app (through build, bundle and package-solution gulp commands) is actually a simple archive you can unzip. Its content can be broken down pretty easily (xml and ...
user avatar
1 vote

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

Try : gulp trust-dev-cert Then gulp serve
user avatar
1 vote

Easiest way to redeploy an SPFX extension

It should not be necessary to retract the installed version first. Just upload a new .sppkg file to the app catalog and update your CDN.
user avatar
  • 2,229

Only top scored, non community-wiki answers of a minimum length are eligible