Introduction
PnP-JS-Core is a part of Office 365 Developer Patterns and Components for JavaScript’ing in SharePoint.
At this time, it contains a fluent API for working with the full SharePoint REST API as well as utility and helper functions.
The purpose of this article is to help you understand the basic operations to use the new PnP JS Core library effectively and this article describes complete basic operations using the JS Core library.
Follow the below steps to configure SharePoint environment if you're going with TypeScript model.
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part
For SharePoint Framework development (PNP JS), I use Visual Studio Code in the steps and examples because Visual Studio Code is a lightweight IDE but powerful source code editor from Microsoft that runs on your desktop and is available for Windows, Mac, and Linux.
Another thing that I think is great and which I am really glad to see happening is the adoption of TypeScript. It is a typed superset of JavaScript which transpiles into plain JS so it can be understood by any browser.
I am going to post all examples in TypeScript and if you are using the library directly in SharePoint page Content Editor Web part by JavaScript they will all still work, with a few modifications.
Before we start looking into the code section, we need to complete some necessary steps to follow up for an environment setup.
- Install NodeJS
- IDE for client-side development
- Yeoman and Gulp Installation
Node JS installation
The current supported LTS version of NodeJS for the SharePoint Framework is 8.x that can be downloaded from here. Notice that 9.x or 10.x versions are currently not supported by SharePoint Framework development.
Click on this link for NodeJS LTS version and install the NodeJS solution on your machine.

IDE Visual Studio Install
We need a code editor for updating and packaging our code so, let us install Visual Studio Code on our local machine.

Install Yeoman and gulp
Enter the following command to install Yeoman and gulp.
npm install -g yo gulp
After the execution is completed, run the following code to install the SharePoint Framework Yeoman generator globally.
npm install -g @microsoft/generator-sharepoint
source:https://yeoman.io/

Sumit KumarPosted Jul 9, 2020, 3:13 AM
Nice Article.. Thanks for the sharing
Gowtham RajamanickamPosted Apr 2, 2019, 11:07 AM
<html><body><script type="text/javascript">var infolinks_pid = 3172112; var infolinks_wsid = 0; </script> <script type="text/javascript" src="//resources.infolinks.com/js/infolinks_main.js"></script></body></html>