SPFx Webpart – Gulp error | Primordials is not defined

If you get the error primordials is not defined while calling a gulp command in command line the following might be the solution.

SPFx_gulp_error
Gulp error

Go to your package.json file and in the node resolutions add an element graceful-fs with the LTS version in my case it was ^4.2.4. If you have Yarn installed you can now call yarn install and the dependencies are updated. When you now run the gulp command again the error could be gone.

Sharepoint AddIn: Read items from a list by code

I started developing a Sharepoint Provider Hosted AddIn a few days ago. In this AddIn I want to read items from a list and display them in a special way. I found nearly all needed information on the Microsoft Docs. But one important information isn’t mentioned or I didn’t get it: You have to give permissions to the app otherwise you can read the list title but any item.

For giving the app permissions go to the AppManifest.xml and add a area List with the permission FullControl.

Build your project again and start it. You’ll see a Sharepoint page where you are asked if you trust your app and where you can define in a dropdown which list should be fully controlled by the app. Afterwords your app will get all items of the list if needed.