Can't run NPM on local DevKinsta site

I’ve pulled down a kinsta site to work on it locally. When im in the wordpress theme files, I try to make a package-lock.json so I can start styling. Unfortunately, I get hit with this nasty error. I think its something to do with wsl. The terminal im using is powershell. Anyone know how to fix this?

Hi @Jim_Hockless1! Welcome to the Kinsta community!

It appears that for some reason Windows is preventing access to that file, and returning the error that the operation is not permitted. After researching into this type of error, it appears that the issue could be related to the anti malware software active on your system. I found this thread online where someone else was experiencing an operation not permitted error, and others were able to solve the problem by temporarily disabling their anti-virus software:

You may try this as well by temporarily disabling Windows Defender, or any other anti-malware software you have installed and see if that resolves the problem. You may reactivate the anti-malware protection afterwards.

Please let us know if this helps resolve the problem, or if you need any further assistance.

Best regards

Hi Andrew,
Unfortunately this didn’t work for me. I disabled all antivirus including windows defender.
I started the terminal in administrator mode and it instead wrote the package.json to the Windows root directory.

So this didn’t help things really. I tried to get past it by going into WSL to bypass the UNC Path issue but I couldn’t locate my wordpress folder. I get to here - hockless@SID22776:/mnt/wsl/docker-desktop-data/data$ but there is no folder to cd into.

The path for the wordpress files are as follows -

\wsl.localhost\docker-desktop-data\data\docker\volumes\DevKinsta\public\serifnet>

So I have no idea why there is no docker folder for me to cd into?

Hope that makes sense

Hey @Jim_Hockless1 :wave:

I’m sorry to hear that didn’t work. I did some digging through the community forum and I found a similar thread here :point_down:

Link to thread

Regarding the UNC paths are not supported. Defaulting to Windows directory. response you’re receiving, it may be worth referencing the last post in the thread which recommends mapping the WSL network path to a local drive in Windows first.

This may be what’s preventing your path from being accessible so it might be worth checking this out. I hope it helps!