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 ...
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 ...
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-...
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 ...
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();...
8
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
7
votes
Accepted
How to Provision Workflows with SharePoint Framework
Workflow is not supported in SharePoint Framework.
Use PnP or Microsoft Flow instead.
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 ...
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 ...
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 ...
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.
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 ...
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?
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
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. ...
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 ...
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 (...
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
...
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 ...
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 ...
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 ...
5
votes
Accepted
Getting warning messages : Warning - [sass] The local CSS class 'min-chart' is not camelCase and will not be type-safe
Resolution
You should either fix all warnings or if it's not possible, you can ignore them.
For that purpose, you should modify your gulpfile.js.
There is one out of the box build suppression method ...
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 ...
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 ...
4
votes
Accepted
SPFx: disabling console traces (by SPFx libraries)
noop it for now by adding this before any of the SPFx stuff gets loaded.
console.log(// extra wrapper so below code is taken out on minification
(function() {
var noop = function noop() {};
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
spfx-tooling × 183spfx × 169
spfx-webparts × 125
sharepoint-online × 44
spfx-extensions × 15
modern-experience × 9
sharepoint-framework × 9
error × 7
react × 6
webpack × 5
development × 4
typescript × 4
gulp × 4
spfx-custom-property-pane × 4
sharepoint-server × 3
javascript × 3
angularjs × 3
2019 × 2
debugging × 2
nodejs × 2
list × 1
sharepoint-foundation × 1
web-part × 1
document-library × 1
office-365 × 1