SPFx Exception – operation not permitted, open ‘C:\Work\webpart.json’

Sathish Nadarajan
 
Solution Architect
June 25, 2020
 
Rate this article
 
Views
624

Problem Statement:

I was using the Extension “Azure Repos” extension to connect with the TFVC from my Visual Studio Code to Checkin/Checkout the Code. Some crash occurred and I was unable to connect with the TFVC. Then, I removed my workspace and connected to the workspace again. The issue with the TFVC got resolved. But a new thing came in to picture.
When I try to Build the application using “gulp build”, I started receiving the below exception.

Operation not permitted Open <>

Solution/Workaround:

The solution for this is very simple. Right click the folder and uncheck the Read Only. That solved my problem. The issue was, when I recreate the workspace, the files which existed already were became readonly. We need to uncheck that to start updating/build/deploy.

Hope this simple step will reduce someone’s search.

Happy Coding
Sathish Nadarajan

Author Info

Sathish Nadarajan
 
Solution Architect
 
Rate this article
 
Sathish is a Microsoft MVP for SharePoint (Office Servers and Services) having 15+ years of experience in Microsoft Technologies. He holds a Masters Degree in Computer Aided Design and Business ...read more
 

Leave a comment