TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kritika Kajale
NA
120
55.4k
SPFX with React framework + pnp js
Jun 26 2019 1:18 AM
I am working on a project in spfx with react framework and I am using pnp js for interacting to sharpoint list/libraries.
I am getting an error in following piece of code.
sp.web.getFolderByServerRelativeUrl("doc_lib_internal_name").files.add(file.name, file, true)
.then((f) =>{
console.log(f.file.listItemAllFields);
return f.file.listItemAllFields;
})
.catch((err)=>{
console.log(err);
alert(err);
});
Error given :
Type-error 'Failed To fetch'.
File is getting added to document library but after that control is going to
catch
block instead of
then
block.
I am not getting where exactly I am doing wrong.
Reply
Answers (
3
)
How to deploy github spfx sharepoint web part from scratch.
SPFX extention (Application customizer ) people picker