Questions tagged [spfx-tooling]

Technical questions about the development tooling for the SharePoint Framework client-side development model.

Filter by
Sorted by
Tagged with
3
votes
1answer
625 views

SPFX and react-router

I'm having trouble getting react-router working on my SharePoint Web Part with React and TypeScript. I have tried react-router as a standalone webapp and it works fine. Just can't get it working on ...
0
votes
1answer
40 views

SPFX - Client side solutions cannot be used in this location

I am facing below issue while adding SPFx package file in App Catalog: Client side solutions cannot be used in this location. Update: I am adding package file in "Apps for Testing" library. "Apps ...
0
votes
1answer
28 views

What version of Node.js can I use if I'm stuck on SPFx v.1.1.0 (SP 2016)?

I'm stuck on SharePoint 2016 for the time being, and I know that means I'm stuck using SPFx v.1.1.0. However, I'm not sure what that means in terms of what version of Node.js to use. I have some ...
0
votes
0answers
50 views

SPFX Add webpart dynamically at runtime

I'm trying to render webparts dynamically at runtime. I have almost no experience with react, so this is where I'm stuck (I think). Using pnp-js I can get the webpart definition and manifest like ...
0
votes
0answers
13 views

How to handle conditional formatting/CSS in PnP Search Web Part?

I just love the PnP Search web part as it allows us to bring forward the enterprise search solutions. Great work!! My question is how to best handle conditional formatting. In the code below I have a ...
7
votes
4answers
9k views

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

I am working on the SharePoint Framework Tutorial 1 for the Hello World Web Part. When running the build command gulp serve to build and preview the webpart I get the following error "Cannot find ...
1
vote
1answer
533 views

Web part not available to add in the Workbench which is hosted on SharePoint Library

I am building my first SharePoint client-side web part (Hello World part 1). Everything works perfect no issues with the following. Successfully set up Machine with NodeJs, Gulp, Yeoman etc Got the ...
0
votes
0answers
30 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 ...
4
votes
2answers
1k views

NodeJS not compatible

when I run gulp serve I get the following error. Your dev environment is running NodeJS version v10.15.0 which does not meet the requirements for running this tool. This tool requires a version of ...
0
votes
1answer
40 views

Does ADAL.js support integrated windows authentication or client credential flow?

I am trying to call Graph API from my SPFx webpart (in SharePoint 2019 on-premise) using ADAL.js. It works fine but user needs to sign-in to Azure AD once. Our on-premise AD is already synched with ...
0
votes
0answers
171 views

SPFx extension samples not showing

I've tried several samples SPFx extensions. All samples have the same outcome when it comes to testing (gulp serve) after following the instructions on the samples page. Most of them just require ...
1
vote
1answer
502 views

Cannot find module '@microsoft/gulp-core-build-serve'

I am getting following stack trace while executing gulp package-solution. I can't create package due to this error. >gulp package-solution { Error: Cannot find module '@microsoft/gulp-core-build-...
5
votes
2answers
2k views

How to get Termset using the new SharePoint framework SPFx

I am new to to Typescript, watched videos and created the sample application of client webpart using new SharePoint development framework. All sample application worked well, and using Rest Queries i ...
4
votes
2answers
298 views

Add an SPFx WebPart from an SPFx Extension on a modern site

Within our product we have created an SPFx extension to show a navigation component on the top of our modern pages. Additional to this navigation component we want to show a button which opens an ...
0
votes
1answer
140 views

Question regarding Typescript version in SPFx

I have few SPFx related queries as mentioned below. What is the current version of typescript in SPFx v1.71? if it is not the latest version then is there any plan to upgrade? It will be great to ...
5
votes
1answer
151 views

Configure multiple modern SPFx Web Parts on classic pages

We have an issue with Sharepoint Web Parts which have worked perfectly fine in the past, but seem to have broken sometime within the past month without change on our side. One modern web part on the ...
6
votes
4answers
4k views

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

I'm trying to build a simple client-side web part using new SharePoint Framework with the help of OfficeDev Site. I've installed all the required components mentioned in OfficeDev After the ...
2
votes
1answer
3k views

Failed to execute 'json' on 'Response': body stream is locked

I am following this article and get the following error in the console.log Uncaught (in promise) TypeError: Failed to execute 'json' on 'Response': body stream is locked at e.json (sp-pages-...
0
votes
1answer
294 views

A service principal with the name User Details Custom API for SPFx

I am consuming an Azure API app in a SharePoint Online react app. I am following this article. But when I try to approve the app permissions on the API management page (SharePoint admin centre). I ...
4
votes
2answers
2k views

spfx webpart Canvas size on Modern Page

I've created an spfx webpart using the react-office-ui-fabric DetailsList. It works fine, but the details list is quite wide. On a modern page the framework is rendeing my webpart in a div that is set ...
1
vote
1answer
105 views

How can I create webpack package of SharePoint online for react App?

I can create package of react app for SharePoint online by using "gulp serve" and "gulp package-solution" commands. However, I want to create package by using Webpack. How can I achieve this?
2
votes
1answer
38 views

Trouble getting SPFx up and running on Ubuntu

I'm having trouble getting SPFx up and running on Ubuntu. I'm using the following commands sudo apt-get install nodejs -y sudo apt-get update -y sudo apt-get install build-essential -y sudo npm ...
2
votes
1answer
253 views

View SPO Modern list in SPFX

I'd like to ask if its possible to achieve something like this -> https://collab365.community/create-manage-sharepoint-list-teams-tab/?fbclid=IwAR0FhFIvH9S51ZNvJbcR_dtFzl0Xe2zljyNP-...
-1
votes
1answer
62 views

Hosting client-side web part from Office 365 CDN

Get-SPOTenantCdnOrigins -CdnType Public commands in Powershell gives me the following result: Public CDN enabled locations: */MASTERPAGE */STYLE LIBRARY */CLIENTSIDEASSETS It works fine in localhost ...
0
votes
2answers
388 views

Provision sharepoint list & columns without creating content type using schema.xml SPFX

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/provision-sp-assets-from-package In the documentation it specifically told us to create fields, add to content type, then add ...
1
vote
0answers
3k views

How to connect Azure DevOps in Visual Studio code

I have been able to do this with a bit of trial and error but I could do with a bit of clarification before I explain this to anyone in my team as I am still a bit confused ! I have a local repo dir ...
2
votes
2answers
144 views

Updating web part files in azure storage

I'm trying to update an existing spfx web part by uploading the new javascript bundled files to azure storage (using gulp --ship && gulp deploy-azure-storage). The problem is every time it ...
2
votes
1answer
483 views

Display SPFx Application Extension differently in Read/Edit mode of a Site Page

Question: Is there a utility built into SPFx or a React library to change what to render based on if the page is in read or edit mode? Or more exactly, a way to switch the rendering when switching ...
1
vote
1answer
218 views

How to find a list or log of all site collections with SPFX extension deployed?

We deployed a spfx extension (Add-PnPCustomAction Location "ClientSideExtension.ApplicationCustomizer" ) to multiple site collections manually, is there a way to use powershell to pull extensions and ...
0
votes
1answer
955 views

SPFX Question Is it possible to include a custom font reference by extending the toolchain?

I have a custom font, I include it in the bundle and add it to the dist folder, but the js reference is still linking to its original location. Any ideas? [
0
votes
1answer
61 views

SharePoint Framework without command line

Is it possible to build SharePoint Framework Web Parts without using NodeJS, Yeoman, gulp?
0
votes
0answers
1k views

Local gulp not found

I am new to SpFx and this might be very much basic question. I have followed instruction mentioned in below page and when I ran "gulp serve" command I got an error which says "Local gulp not found" ...
5
votes
2answers
3k views

SharePoint Framework – Loading Font Awesome CSS from CDN

I am fairly new to the SharePoint Framework development stack (TS, React, node, etc.) and am looking to incorporate the font-awesome suite into my web-part via a CDN. Normally I would reference this ...
2
votes
0answers
232 views

Webpart built using latest spfx version not working on the classic site

I have built an angular 1.x webpart application using the spfx 1.4 version. The webpart works in the modern sites pages but is not working on the classic site pages and I am getting the following ...
2
votes
1answer
220 views

SPFx package bundle issue

I was able to successfully build the package and deploy it to CDN and Sharepoint, it's working fine for the first release. If I want to update the typescript code to change my UI/logic and release a ...
3
votes
0answers
364 views

SharePoint Framework error : Resource “jquery” not found in loader configuration of manifest for component

I know that this question has already been there, but am raising it because after trying all blogs issue did not get resolved. Am trying to load non-AMD module having dependency on AMD module. Since ...
1
vote
1answer
2k views

Implement Display, Edit and New forms in spfx web part using reactjs

I have 3 buttons on spfx web part 'Display','Edit' and 'New'. When I click on these buttons, respective form should open with text boxes and data from sharepoint (online) list. I want to use Reactjs ...
2
votes
1answer
607 views

Modify/Access webpart properties in SharePoint Framework (Spfx)

I am trying to saving some value in the Web part properties. I know in Spfx you can save or update any value in webpart property like this.properties.myProp = "newValue"; I am using angular ...
0
votes
0answers
267 views

How to reference strings.js in SPfX? (Uncaught TypeError: Cannot read property 'STS' of undefined)

I am trying to migrate my code from Classic experience to SPfX. My code is using the SP.UI.ModalDialog, and I have referenced successfully the MicrosoftAjax.js, SP.Runtime.js and the SP.js files in ...
0
votes
1answer
1k views

Interacting with Lists in SPFx?

I would like to start building SFPx web parts which interact with lists in my site, but I am having a hard time figuring out List interactions. Where can I go other than the tutorials from Microsoft (...
1
vote
1answer
492 views

Using spservices module

I have a SPFx web part I'm trying to include spServices in. I've done the npm install for jquery@2 and spServices, run npm install in the project root directory, and tried to run grunt (as outlined in ...
0
votes
1answer
161 views

Mismatch in SPFX ListviewCommandSet buttons visibility in modern Document Library

When I set the visibility of the the custom button, It should be applicable at both places (ContextMenu + CommandBar). I am having 2 buttons (Add Fav + Remove Fav). Based on few conditions, i am ...
5
votes
1answer
119 views

SPFX from scratch

I would like to know if it is possible to implement an SP application WITHOUT using yeoman. Let me explain: I would like to create an application using VueJS and WebPack (maybe without gulp and ...
1
vote
1answer
250 views

Problems Unit Testing in SharePoint Framework (SPFx) with External Dependencies

I'm attempting to use Elio and Velin's guidance on creating unit tests for the SharePoint framework. Both appear to work great for vanilla components, but I'm running into problems when trying to ...
3
votes
1answer
2k views

How do I disable trailing-comma tslint rule in SPFx scaffolding?

I ran the current Yeoman SharePoint generator, and got the following ts-lint file in the config directory (with a few minor tweaks added). From what I can tell the trailing-comma rule should be ...
1
vote
2answers
373 views

Best practice recommendation for where to locate SPFx ReactJS component code?

In looking at various SPFx tutorials/samples, I've noticed different paradigms demonstrated for where to locate the ReactJS component code. For example, Patrick Rodgers' tutorial on transitioning to @...
3
votes
3answers
555 views

SPFX- Array.prototype.diff - (TS) property “diff” does not exist on type 'any[]'- es6 issue?

I have some code that takes a SP List item column (a news article tagged to one or more choice categories) and want to show that to users who have a user profile property with one or more categories ...
0
votes
2answers
145 views

Webpart visible in edit but disappears in preview

UPDATE I've tested on different tenants, it seems to only work in those that isn't a first release tenant. It doesn't even work with the default built-in webparts that have been served by microsoft. ...
1
vote
1answer
402 views

Error when displaying HelloWorld web part in tenant workbench

My HelloWorld web part works fine in my localhost workbench. On my tenant workbench, I can add the web part but then I get the attached error instead of displaying it.
3
votes
1answer
1k views

Deployed app customizer sppkg doesn't show up in site collection's app catalog

Following the documentation to create an app customizer and bundled with no changes to the code from the yo generator code base (@microsoft/generator-sharepoint was v1.3.4). The debug mode ?...