Questions tagged [spfx-tooling]
Technical questions about the development tooling for the SharePoint Framework client-side development model.
177
questions
2
votes
2
answers
7k
views
How to tell if page is in view/edit mode in SPFx?
Trying to build an extension to display differently based on if the page is in view or edit mode.
Is there a built in way to see if a modern Site Page is in Read or Edit display mode?
I know of ...
2
votes
3
answers
3k
views
Can we customize Materpage and layouts with SPFx?
I am working on SharePoint Framework and have one take to do in this. I want to know that can we add our custom master page and page layouts in SharePoint Online using the SharePoint Framework?
If ...
2
votes
2
answers
2k
views
Can a user update a SharePoint list using SPFx without the user having access to the list?
In C# you could allow users to access a SharePoint list they have no access to by using SPSecurity.RunWithElevatedPrivileges(delegate () .....etc. Is there a way achieving the same functionality ...
2
votes
1
answer
805
views
@microsoft/sp-loader install fails with install script error
I'm trying to create SharePoint Framework hello world project as mentioned in tutorial. But it fails in the end with error npm ERR! @microsoft/[email protected] install: node npm-install-script.js.
...
2
votes
1
answer
1k
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 ...
2
votes
1
answer
2k
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 ...
2
votes
1
answer
256
views
deploy solution to cdn with source maps
I have a webpart that works fine in the workbench but when I deploy it to the appcatalog and my cdn, it is not behaving the same as it does on the workbench.(I am rendering a fabric CommandBar that ...
2
votes
1
answer
1k
views
reference tenant site in config.json
I am working in deploying my first spfx webpart to production. I an testing it on my personal dev tenant first.
I am hosting all my assets in a separate site collection called cdn (in both my ...
2
votes
2
answers
150
views
Does anyone know how a custom SharePoint list to be showed as a persona card?
I'm a new in SharePoint solution ,my problem is that i have a custom SharePoint list which have people inside and i want that people with the credentials to be showed as a persona card like MS graph ...
2
votes
2
answers
14k
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-...
2
votes
1
answer
305
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 ...
2
votes
1
answer
483
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 ...
2
votes
2
answers
255
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
1
answer
245
views
SPFx npm audit results in high and critical vulnerabilities
Despite the fact I am using latest version of SPFx tooling (1.13.0) released 5 days ago, when I run npm install/ npm audit I get 96 vulnerable dependencies while over 40 high and 3 critical.
Majority ...
2
votes
1
answer
130
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
1
answer
842
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-...
2
votes
0
answers
428
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
2
answers
897
views
SharePoint Framework onchange method not called
I'm new to SPFx and doing this plain Javascript web part to kick off things but have hit a read block.
I can't seem to figure out on how to properly call the oncahnge method on a search input:
<...
2
votes
0
answers
370
views
Adding a webpart to existing spfx solution via yeoman generates error
When I run the following commands to create a sharepoint framework solution, change directory to the new solution and then add a second web part to the solution...
yo @microsoft/sharepoint --...
2
votes
1
answer
229
views
Gulp build task fails
I'm trying to build (gulp bundle --ship) the GDPR Starter kit from: https://github.com/SharePoint/sp-dev-gdpr-activity-hub.
It fails with the below error:
> TypeError: Cannot read property '...
2
votes
2
answers
244
views
Sharepoint framework, environment specific build configs [closed]
How to separate string constants depends on environment (dev\test\prod) build in Sharepoint Framework?
2
votes
0
answers
415
views
Error 4048 when trying to install Yeoman SharePoint generator
After running the following command:
npm install -g @microsoft/generator-sharepoint
For some reason, it wants to rename "generator-sharepoint-77d8330f" to "generator-sharepoint" and it fails when ...
2
votes
1
answer
446
views
Invalid SharePoint App package spfx
I'm trying to deploy my spfx app to the app catalog and after I upload it it appears in the app catalog in the 'Unavailable Apps' view with the Error message :
Invalid SharePoint App package. Error:...
2
votes
0
answers
105
views
SPFx development with Reactide, instead of the SPFx Workbench?
Before I spend more time on this to evaluate how this tools stacks up to the SPFx Workbench..
Question: Is anyone else following, or tried to use Reactide with SPFx?
source: https://github.com/...
2
votes
1
answer
606
views
SPFx breakpoints and debugging from Visual Studio Code instead from Chrome
I am trying to find a way to debug my local SPFx workbench from Visual Studio Code instead from Chrome, but I could not find any guides on how to attach the Chrome to Visual Studio Code and hit a ...
1
vote
4
answers
3k
views
Unable to test client side webpart hosted in SharePoint
While attempting Tutorial 1: HelloWorld WebPart, Step 6: Preview web part in SharePoint.I am having an issue that is preventing the SharePoint hosted workbench from loading the webpart. After ...
1
vote
1
answer
2k
views
Getting warning messages : Warning - [sass] The local CSS class 'min-chart' is not camelCase and will not be type-safe
I am using third party css in SPFx. When I am building it, SPFx is showing me lots of warning messages :
I am using Windows 10 / SPFx 1.11.0.
Please let me know how to disable these warning messages.
...
1
vote
2
answers
770
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 @...
1
vote
1
answer
463
views
I am not able to access the method 'refreshPropertyPane' to refresh the web part properties pane
As I am following the tutorial (Use cascading dropdowns in web part properties) for learning the sharepoint framework. I did everything as mentioned in the article, but I am not able to access the ...
1
vote
1
answer
298
views
Trying SPFx Tutorial 5 without VS2015 installed
I have set up my Windows 10 Machine for SPFx development. I am using Visual Studio Code and not Visual Studio itself.
NB When you install Python (Setting up your machine) it needs .NET 2.0 to be ...
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 ...
1
vote
3
answers
2k
views
How to use Yeoman Generator to generate a SharePoint 2016 SPFx web part (without errors)
I need to create an SPFx web part for SharePoint 2016. I have been following the instructions here but am getting an error when running "yo @microsoft/sharepoint".
I know that versions of ...
1
vote
1
answer
626
views
Where is HttpClient and related classes in SPFx 1.1?
I am finally able to get started using SPFx. Stuck on 2016 / SPFx 1.1.
The documentation for the HttpClient class says it's in the @microsoft/sp-http package. However, the Yeoman generator did not ...
1
vote
2
answers
4k
views
Error trying to reference an image in SharePoint Framework web part using react
when I'm trying to reference an image in my react component in the render method as follows.
const leaderImgSrc = require('myimage.jpg');
and then in the TSX
<img src={leaderImgSrc} alt='an ...
1
vote
1
answer
338
views
SPFx remove (per project) node_modules and typings directory
I am working on smaller, but faster SSD drives, so every Megabyte hurts.
We are also used to zipping up entire projects and mailing it to developers costing half my rate
If I run the command
yo @...
1
vote
1
answer
2k
views
gulp serve error
I'm trying to work on a project of a SPFx web part. The project was built normally but when I try to test my web part on my tenant the following error occurs:
Error: Your dev environment is running ...
1
vote
2
answers
1k
views
Attempting to delete multiple items from SP list using pnpjs V3 but getting error on ```createBatch()```
I'm following this documentation: https://pnp.github.io/pnpjs/sp/items/#add-multiple-items But I'm getting an error with sp.web.createBatch():
import { SPFI, spfi, SPFx } from "@pnp/sp";
...
1
vote
2
answers
3k
views
Error - [spfx-serve] Error: Invalid glob argument with spfx - gulp serve
I'm setting up a development environment for SP2019.
I've installed as per the development stack recommended within the guidance material and roadmap page for SPFx 1.12.1 https://docs.microsoft.com/en-...
1
vote
1
answer
6k
views
Getting "Access token validation failure. Invalid audience" for Aad application in spfx
I have created one AAD application with below configuration and trying to access the Graph APIs added in the AAD application using SPFx
SPFx configuration and code:
Error:
Please suggest if I am ...
1
vote
1
answer
4k
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 ...
1
vote
1
answer
961
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 ...
1
vote
1
answer
271
views
SharePoint Framework: ".bundle.js" part missing from asset file name - is this ok?
I upgraded an old SPFx project from version 1.0.0 to 1.2.0 (most core libs in "package.json"). With this update the schema of the "config.json" changed. One of the changes is concerning me.
...
1
vote
1
answer
43
views
Packaged/Shipped version adds : to data ?? Workbenches are fine
when I run my SPFx webpart solution in the local- or hosted- Workbench, everything seems OK. The data received from lists is displayed correctly, e.g. Freddy, Prayer request, Prayer for money, Food ...
1
vote
1
answer
2k
views
Problem importing Placeholder from @microsoft/sp-webpart-base
I try to create a SPFx React WebPart using the component pattern as described in the React-Todo-Basic sample. I get stuck in the container component when I try to
import { Placeholder } from '@...
1
vote
1
answer
2k
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-...
1
vote
2
answers
380
views
Unable generate default web part with SFx with Yeomen
I was following
https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment on Windows 10 machine.
I opened command prompt window in Admin mode.
installing NodeJS, npm and then
...
1
vote
3
answers
2k
views
Dev-Cert error when trying to debug
I receive the following error when I try to install the dev-cert in the new SharePoint framework development model.
Has anyone seen this before or know what might be causing this error on my PC?
PS ...
1
vote
2
answers
802
views
SPFx client side web parts onpremise
I am trying to develop a traditional web part (SP2013, SP2010..) to host a modern SPFx client web part. I developed most of the plumbing and wrapping and I have some problems when actually render the ...
1
vote
1
answer
1k
views
Sharepoint workbench page with NoComponentId error
So I did basic hello webpart setting and ran gulp which shown me SP framework local page.
Now i wanted to see this in sharepoint context , so
I copied workbench.aspx from https://github.com/...
1
vote
1
answer
682
views
Would multiple SPFx webparts on page load duplicate dependencies?
If I have an SPFx webpart and that webpart uses these dependencies:
jQuery
jQueryUI
Angular
LoDash
Then I have another SPFx webpart and that one uses:
jQuery
jQueryUI
React
Moment
If I load ...