7
votes
Accepted
Property 'web' does not exist on type 'SPRest'
In the previous versions 'web' was still present in the rest.d.ts file of the @pnp/sp package. That's not the case anymore. In your main webpart TypeScript file, you have to use the import as follow:
...
5
votes
Accepted
Updating SPFX breaks gulp
In 1.6.0 projects the config/tslint.json file was removed and a new one is created at the root of the solution.
Delete E:\DevEnv\WebParts\react-full-iframe\config\tslint.json. You should also add the ...
3
votes
Sharepoint framework (spfx) failes to create new project
Try to reinstall node js version 8.* https://nodejs.org/dist/latest-v8.x/ It is officaly supported version by Microsoft.
Then try to run yo generator without the parameters. Only yo @microsoft/...
3
votes
Share "node_modules" folder between webparts
Instead of creating a different projects for the webparts, please create all the webparts in a single SPFx solution. These webparts will share the common node_modules folder of the SPFx solution.
...
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/...
2
votes
Share "node_modules" folder between webparts
This is standard behaviour and the best approach for various reasons.
Each project (which can include 1 or more webparts) needs to have a node_modules folder. This ensures that who ever builds your ...
2
votes
2
votes
Accepted
SPFx development - npm audit vulnerabilities
With SPFx solutions, none of the npm packages are deployed to SharePoint, so you can ignore these audit warnings. If you had a custom solution that did deploy the npm packages themselves, yes you'd ...
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/...
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 ...
1
vote
Accepted
ts Cannot find the module
It looks like it is bug in visual studio code or may be in yomean or may be in typescript because when I run
gulp serve
it compile web part and resolve the issue by it self. Hope this can help ...
1
vote
Property 'web' does not exist on type 'SPRest'
In IReactSpfxProps.ts file:
import { WebPartContext } from "@microsoft/sp-webpart-base";
export interface IReactSpfxProps {
description: string;
context: WebPartContext;
}
...
1
vote
How to fix error cannot find module @microsoft/sp-build-web.When trying the sp-dev-ebpart samples
@microsoft/sp-build-web should be installed when you run npm install the first time.
In package.json, this is referenced in the devDependencies section:
"devDependencies": {
"@microsoft/sp-build-...
1
vote
Got the error in SPFx installation "Yeoman Doctor - Running sanity checks on your system"
Have you added C:\Program Files\nodejs to your PATH environment variable ?
Follow the steps below :-
Search for the Environment Variables
Once you locate them Click on Edit Environment Variables.
...
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
1
vote
Accepted
SharePoint 2016 On Premise Dev using SharePoint Framework
Install SharePoint Feature Pack 2 from here:
security update for SharePoint Server 2016: September 12, 2017
This update allows SPFX Development in SharePoint 2016 on-premise.
1
vote
Accepted
pnp.sp.site.getWebUrlFromPageUrl method is returning wrong web URL
Not really sure why GetWebUrlFromPageUrl is not working. But as you mentioned in the comment that you want the current sp web url, you can use the this.context.pageContext object.
No need to make a ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
npm × 24spfx × 17
spfx-webparts × 7
sharepoint-online × 5
nodejs × 5
web-part × 3
typescript × 3
gulp × 3
yeoman-generator × 3
development × 2
error × 2
pnp × 2
sharepoint-framework × 2
pnp-js-core × 2
office-dev-pnp × 2
sharepoint-enterprise × 1
sharepoint-server × 1
powershell × 1
office-365 × 1
security × 1
sharepoint-hosted-app × 1
json × 1
react × 1
spfx-tooling × 1
share × 1