1

I can not access getFolderByServerRelativeUrl() in pnp API.

await sp.web.getFolderByServerRelativeUrl()

Error:

Property 'getFolderByServerRelativeUrl' does not exist on type 'IWeb'.

2

1 Answer 1

1

I just change

import { sp } from "@pnp/sp";

to

import { sp } from "@pnp/sp/presets/all";

Then it works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.