Closed necik11 closed 9 months ago
Not sure how it happened but you ended up in the documentation for version 2. You stated above you're using version 3.20.1 so you should start here: https://pnp.github.io/pnpjs/getting-started/
I would also just say that this statement concerns me but may be just the way I'm reading it.
I am trying on local environment + gulp serve so i am using interactive auth.
You can certainly locally gulp serve, but you need to be at least using the hosted SPFx workbench
Probably because I googled it and it referred me there (sorry for confuse). So in version 3 something like @pnp/config-store no longer exists and I have to do it myself?
Anyway, I've been doing spfx for a while now, so "getting started" isn't necessary :).
And I don't have a problem with running webpart or extensions (CA), but I have a problem with loading the configuration property for multiple sites - I want to load application configuration from one place and share it across an application in a consistent way.
That is why the procedure is described further "tenant properties" which are referenced correctly. And still a bug in the documentation - "IStorageEntity ".
Yes, I use tenant properties for that type of thing as well, so I agree that's a good use case. And yes, there might be a bug in the documentation for the import. I'm not exactly clear what you're saying above. Do you need help getting the sample for a tenant property working or are you just saying there's a bug in the docs?
Thank you for the very quick reply.
getstorageentity:
there is this import:
import { spfi, SPFx, IStorageEntity } from "@pnp/sp";
But in @pnp/sp is no IStorageEntity.
Like i wrote, there must be import like this:
import { IStorageEntity } from "@pnp/sp/presets/all";
or
import { IStorageEntity } from "@pnp/sp/webs" ;
Ok, sure... looks like a bug in the docs. I can fix it real quick for you.
Because of such a "little thing" I would not write. My original question was about "config-store", which unfortunately is no longer current (didn't notice I was looking at v2). 🙈 And since I've already taken your time, I wanted to at least point out a liitle mistake in the documentation. thank you very much
This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.
Major Version
3.x
Minor Version Number
3.20.1
Target environment
SharePoint Framework
Additional environment details
I am using SharePoint Framework. I am trying on local environment + gulp serve so i am using interactive auth.
Expected or Desired Behavior
Load Setting from choosen web.
Observed Behavior
Argument of type 'IWeb & IInvokable' is not assignable to parameter of type 'IWeb'.
Type 'IWeb & IInvokable' is missing the following properties from type 'IWeb': createBatch, _update, _forceCaching, toUrlAndQuery, and 19 more.ts(2345)
Steps to Reproduce
From: documentation Getting Started: npm install @pnp/sp @pnp/config-store --save
Error on "w":
I need exactly what´s wrote: load application configuration from one or more providers and share it across an application in a consistent way.
I also have a question related to this, wouldn't it be better to use tenant properties : + use the cache from your old solution: https://github.com/SharePoint/PnP-JS-Core/blob/master/src/configuration/pnplibconfig.ts
Anyway, there is bug even in the documentation for getStorageEntity
IStorageEntity no longer belongs to pnp/sp but must be use:
import { IStorageEntity } from "@pnp/sp/presets/all";
orimport { IStorageEntity } from "@pnp/sp/webs" ;