Questions tagged [spfx]

The SPFx, also known as the SharePoint Framework, offers a robust page and web part model that fully caters to client-side development on SharePoint. It effortlessly integrates with SharePoint data and provides seamless support for open source tooling.

Encountering an error during the installation of knockout via npm due to an unresolved peer dependency issue

I'm in the process of setting up knockout with node.js and running the command below: npm install knockout However, I'm encountering the following errors. UNMET PEER DEPENDENCY underscore@^1.8.3 npm WARN [email protected] requires a peer ...

Guide on exporting a function from a class for easy import into another class

I am currently diving into TypeScript and React for spfx developments. Despite going through various tutorials, answers on Stack Overflow, and other sources, I am still struggling to fully grasp the concepts. Below is a snippet of my function within the E ...

Question from a student: What is the best way to transfer information between different classes?

Currently, I am delving into SPFX development. My focus is on constructing a form that incorporates multiple classes in order to gain insight on how they can interact and share data among one another. In this scenario, I have established two distinct clas ...

SPFX - Slow Installation of NPM Packages

Is it necessary to run a npm install for SPFX if all the required modules have already been globally installed? The process of restoring modules can be quite time-consuming, and I am hoping to avoid it if possible. ...

When I run "gulp serve," I receive the error message: "Uncaught ReferenceError: primordials is not defined."

Today marks my first day diving into the world of SPFx, Gulp, and Yo. I decided to follow a tutorial, but encountered a major error that's preventing me from moving forward: mini-3:helloworld-webpart admin$ gulp serve ReferenceError: primordials is no ...

The history.push method in React seems to be malfunctioning, and the useHistory hook

I am struggling to implement a page redirection upon form submission. I have come across various suggestions, such as: this.props.history.push("/") And also the recommendation to utilize: import { useHistory } from 'react-router-dom'; //Followe ...