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

'gulp serve' command opens SharePoint Framework workbench in a blank screen

In the 0.1.0 version of @microsoft/generator-sharepoint it has started setting gulp serve to use https. This is the right approach so you don't have to set your browser to allow unsafe scripts, but ...
Per Jakobsen's user avatar
  • 32.4k
10 votes
Accepted

SPFx: Yo is not recognized as an internal or external command

install the latest version of node install the latest version of npm: npm i -g npm@next run the following in your cmd window or commander window: call npm uninstall -g chalk call npm uninstall -g ...
LuisCarlos's user avatar
9 votes
Accepted

How does Workbench.aspx in Office365 get local files?

The workbench.aspx inherits from Microsoft.SharePoint.WebControls.ClientSidePage which I assume uses the specified ClientSideApplicationId to load a specific Client Side Application. The id 8be81a5c-...
Per Jakobsen's user avatar
  • 32.4k
8 votes
Accepted

Does an SPFx webpart run on Gulp or Node as web server?

Neither Gulp or Node act as the web server. The web server used for SPFx is Connect, see below. These are (some of) the different moving parts in the SPFx workbench Node.js: is the JavaScript ...
Wictor Wilen MCA MCM MVP's user avatar
8 votes

SharePoint Framework – Loading Font Awesome CSS from CDN

In SPFX GA version the ModuleLoader was renamed to SPComponentLoader. import { SPComponentLoader } from `'@microsoft/sp-loader'; It continues to be userd in constructor: constructor() { super();...
rtcardoso's user avatar
8 votes
Accepted

SharePoint Framework: how to change TypeScript version used by gulp?

The mystery is solved. The typescript version is pulled in by tslint and in turn by the internal gulp-related typescript. The output of "TypeScript version: 2.1.6" happens when the tslint task starts ...
Heinrich Ulbricht's user avatar
7 votes
Accepted

SPFx: Is TypeScript compulsary for future SharePoint development?

Short answer - no, it's not required. Longer answer - The toolchain we'll provide and invest in will be TypeScript based, as that is what we use internally for our own work, and we've found that it ...
PatMill_MSFT's user avatar
  • 2,466
7 votes
Accepted

Reverse engineer TypeScript output back to source code?

SPFx webparts are JavaScript so, yes, you can reverse engineer them. If you load a client-side webpart and use F12 browser tools you can see the code which is bundled into a big JavaScript file by ...
SPDoctor's user avatar
  • 9,613
7 votes
Accepted

SharePoint Framework web parts - dynamic properties pane

The easiest way to do this would be to load the data in your OnInit() method, and then reference it in your property pane. That won't work if you need the data to be more reactive (ie, you first ...
PatMill_MSFT's user avatar
  • 2,466
7 votes

SPFx: Yo is not recognized as an internal or external command

Most likely cause is the NPM folder is missing from the PATH declaration, so it can not find the commands installed in the NPM folder For Windows: Check if everything is correctly installed Execute ...
Danny '365CSI' Engelman's user avatar
7 votes

Cannot test SPFX webparts on my SharePoint tenancy

Run the below command to install the certificate, note that the certification error in the local workbench also disappears after this. gulp trust-dev-cert After this, you can run gulp serve to again ...
Gautam Sheth's user avatar
  • 30.9k
7 votes
Accepted

How to Provision Workflows with SharePoint Framework

Workflow is not supported in SharePoint Framework. Use PnP or Microsoft Flow instead.
Aashirya's user avatar
  • 1,021
6 votes

Gulp serve error : Cannot find module '@microsoft/sp-build-web'

Update to node package manager (npm) 3 using npm -g install npm@next and your path length issues should go away This is because the LTS version of node ships with npm v2.x whereas npm 3.x has better ...
GavinB's user avatar
  • 2,013
6 votes
Accepted

SharePoint Framework – Loading Font Awesome CSS from CDN

The easiest way to load CSS from CDN is using the ModuleLoader class. First you import ModuleLoader in your code: import ModuleLoader from '@microsoft/sp-module-loader'; Then, in the web part's ...
Waldek Mastykarz's user avatar
6 votes

SharePoint framework

SPFX webparts will not have any server side code and it is all written in Javascript/typescript with Calls made to SharePoint using REST API or using JSOM. But if you need to write some server side ...
Unnie's user avatar
  • 8,819
6 votes
Accepted

trying to add office-ui-fabric-react in a yo generated spfx webpart causes error on build

The latest OUIFR release is not compatible with SPFX at this point. You should install version 4.28.0 of OUIFR.
PatMill_MSFT's user avatar
  • 2,466
6 votes
Accepted

How to tell if page is in view/edit mode in SPFx?

The correct answer is valid but it will not cover all the scenarios, if you need to detect the edit mode from an SPFx solution on a classic page the Mode=Edit will not be available. A more reliable ...
Joao Ferreira's user avatar
5 votes

SPFx: disabling console traces (by SPFx libraries)

No, that is not possible at this time. Interesting idea though. Can you as it a feature request to the github issue list?
PatMill_MSFT's user avatar
  • 2,466
5 votes
Accepted

Missing workaround in SPFx JQuery WebPart

As soon as you do your first successful build, that error in the IDE should go away. See this issue in github - https://github.com/SharePoint/sp-dev-docs/issues/22
PatMill_MSFT's user avatar
  • 2,466
5 votes

Does an SPFx webpart run on Gulp or Node as web server?

SPFx uses a Gulp plugin called Gulp connect to start the webserver hosting the Workbench. You're right saying that Gulp is a task-runner. In a way you could compare it MSBuild in .NET development. ...
Waldek Mastykarz's user avatar
5 votes
Accepted

Passing a property to a child component

So, you're using React as your JavaScript framework, if you don't have a lot of experience with React and how it works I'd suggest you to first read more about it and play with it outside the new ...
Rafael Rocha's user avatar
5 votes

Can a user update a SharePoint list using SPFx without the user having access to the list?

As Eric mentioned, no. You can't do this, and you won't be able to do this directly from the browser, as anything the browser can do, anyone else can do. What you would want to do is the following (...
PatMill_MSFT's user avatar
  • 2,466
5 votes
Accepted

How to get Termset using the new SharePoint framework SPFx

There is a sample for Taxonomy in sp-dev-fx-webparts. Following things you can get from this sample Reading taxonomy term stores' hierarchy from SharePoint Loading JavaScript Object Model scripts ...
Atish Kumar Dipongkor's user avatar
5 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 ...
Gautam Sheth's user avatar
  • 30.9k
5 votes
Accepted

Interacting with Lists in SPFx?

To do CRUD operations with SharePoint lists and libraries, you can take a look at the GitHub sample by Waldek Mastykarz. The sample does CRUD operations on SharePoint lists using multiple frameworks ...
Gautam Sheth's user avatar
  • 30.9k
5 votes
Accepted

NodeJS not compatible

You can use nvm (node version manager) to quickly switch between different nodejs versions. Download for windows or OSX version. How to use Install nvm $ nvm install 8.11.0 - installs nodejs ...
Sergei Sergeev's user avatar
4 votes

'gulp serve' command opens SharePoint Framework workbench in a blank screen

I assume you have installed Node, Gulp and Yeoman without errors. I also assume you have created a new SPFx project using the command yo @microsoft/sharepoint When done you navigate to the root ...
Benny Skogberg's user avatar
  • 25.5k
4 votes

SPFx: Is TypeScript compulsary for future SharePoint development?

SPFx development can only be done with (thorough) TypeScript knowledge (and the whole dev stack) No I have gone from no knowledge to producing proof of concept code for a relatively complex ...
Sebastian Rogers's user avatar
4 votes
Accepted

Adding onClick event to a React Web Part

You don't seem to have any markup returned from your render method. In your JSX (or in this case TSX) markup you just need to add the onclick and point to a function in your class, something like this:...
SPDoctor's user avatar
  • 9,613
4 votes
Accepted

Tutorial 4 of SharePoint SPFx Tutorials: Error configuring web part to load from CDN

I just ran into the same problem, and fixed it by running the gulp --ship command after I changed the "write-manifests.json" file. (The tutorial at HelloWorld, Deploy to CDN does not run that ...
Stig Lytjohan's user avatar

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