How to resolve the error - eperm operation not permitted?

1.1K    Asked by FerminaZamorano in Salesforce , Asked on Mar 2, 2023

Went to create a new scratch org, and got a warning:


Warning: sfdx-cli update available from 7.102.0 to 7.104.0.

The scratch org was created without issue, but I figured I may as well update to the latest CLI version. I ran sfdx update and get the following error:


PS C:UsersA PersonProjectsBluVectorSalesVector> sfdx update
sfdx-cli: Updating CLI from 7.102.0-dd7aac3 to 7.104.0-8acfa0e... done
sfdx-cli: Updating CLI... done
    Error: EPERM: operation not permitted, unlink 'C:UsersA PersonAppDataLocalsfdxclient7.102.0-dd7aac3binnode.exe'
    Code: EPERM

The batch file cannot be found.

Answered by David Piper

To resolve the error - eperm operation not permitted - I added the location to environment variables and it's working fine now. For those who didn't understand anything I said above, What I did was,

I went to the location specified in the error.

  Copied the location.(Here, its here => C:UsersA PersonAppDataLocalsfdxclient.102.0-dd7aac3in)

Search for environment variables in windows search bar

  Select 'Edit the System Environment Variables' and press the 'Environment Variables' button under 'Advanced' Tab.

Select path and click on edit. Click New.

  Paste the location. Here, it is => C:UsersA PersonAppDataLocalsfdxclient.102.0-dd7aac3in

Click Ok for all windows and restart your VSCode. It's Done !



Your Answer

Interviews

Parent Categories