# How do you 'npm install' in docker volume?

**URL:** https://community.kinsta.com/t/how-do-you-npm-install-in-docker-volume/2363
**Category:** Questions
**Created:** [July 13, 2023, 3:08pm UTC](https://community.kinsta.com/t/how-do-you-npm-install-in-docker-volume/2363 "2023-07-13T15:08:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ghughes13](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/ghughes13/32/2210_2.png) [@ghughes13](https://community.kinsta.com/u/ghughes13)
#### Post date: [July 13, 2023, 3:08pm UTC](https://community.kinsta.com/t/how-do-you-npm-install-in-docker-volume/2363/1 "2023-07-13T15:08:23Z")

</div>

I’m trying to go through the `Custom Gutenberg Block Development With the WordPress Block Editor` course on Kinsta Academy.

In it, on the ’ [Setting Up a Block Plugin With @wordpress/create-block](https://academy.kinsta.com/dashboard/course/gutenberg-block-development/5/6)’ section he talks about navigating to the site’s plugin directory and running `npx @wordpress/create-block`.

Mine is located here - `\\wsl.localhost\docker-desktop-data\data\docker\volumes\DevKinsta\public\test-site\wp-content\plugins` - so I open that in the terminal and try to run it, but get the following error:

`UNC paths are not supported. Defaulting to Windows directory.

Creating a new WordPress plugin in the my-first-block directory.  
node:internal/process/promises:288  
triggerUncaughtException(err, true /\* fromPromise \*/);  
^

[Error: EPERM: operation not permitted, mkdir ‘C:\Windows\my-first-block’] {  
errno: -4048,  
code: ‘EPERM’,  
syscall: ‘mkdir’,  
path: ‘C:\Windows\my-first-block’  
}

Node.js v18.12.1`

I’ve been banging my head against the wall trying to figure out a way to get this to work, but haven’t had any luck. Anyone have any suggestions?

---

<div class="post-metadata">

### Author: ![ghughes13](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/ghughes13/32/2210_2.png) [@ghughes13](https://community.kinsta.com/u/ghughes13)
#### Post date: [July 13, 2023, 3:10pm UTC](https://community.kinsta.com/t/how-do-you-npm-install-in-docker-volume/2363/2 "2023-07-13T15:10:36Z")

</div>

- I have tried running the npx command elsewhere and manually moving the result over, which works, but I also need to be able to open the plugins directory in vs code for development & be able to run `npm start` in the directory.

---

<div class="post-metadata">

### Author: ![ZachE](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/zache/32/1683_2.png) [@ZachE](https://community.kinsta.com/u/ZachE)
#### Post date: [July 14, 2023, 2:40am UTC](https://community.kinsta.com/t/how-do-you-npm-install-in-docker-volume/2363/4 "2023-07-14T02:40:09Z")

</div>

Hi @ghughes13 👋

It looks like npx uses Command Prompt (cmd.exe) which does not have the proper permissions to create directories in C:\Windows, which is the default when you try to specify a UNC path.

Also, cmd.exe isn’t running as Administrator, so it will get a Operation not permitted error because it’s trying to `mkdir` (create a directory) in C:\Windows\ which requires Administrator user or group access.

Would you be able to try this solution, and let me know if it works?

# Map your UNC path to a normal drive letter

> <https://stackoverflow.com/questions/74000168/running-an-express-server-from-wsl-unc-paths-are-not-supported/74016001#74016001>

---

<div class="post-metadata">

### Author: ![Gulshan\_Negi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/gulshan_negi/32/2470_2.png) [@Gulshan\_Negi](https://community.kinsta.com/u/Gulshan_Negi)
#### Post date: [October 6, 2023, 7:06am UTC](https://community.kinsta.com/t/how-do-you-npm-install-in-docker-volume/2363/5 "2023-10-06T07:06:51Z")

</div>

Well, you are trying to run Node.Js commands on a UNC path but for more information, I want to tell you that Windows does not fully support UNC. However, to resolve this issue you can do the below steps.

1. You can use WSL (Window Subsystem for Linux)
2. You can also use PowerShell or a command prompt  
Thanks

---

<div class="post-metadata">

### Author: ![Agus](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/agus/32/1515_2.png) [@Agus](https://community.kinsta.com/u/Agus)
#### Post date: [October 6, 2023, 7:35am UTC](https://community.kinsta.com/t/how-do-you-npm-install-in-docker-volume/2363/6 "2023-10-06T07:35:49Z")

</div>

Thank you for your reply and suggestion here @Gulshan_Negi🙇‍♂️  
As I could see though, the original poster seems to be using WSL based engine already (in the Docker Desktop) as it was mentioned above:

> [@ghughes13](#):
>
> Mine is located here - `\\wsl.localhost\docker-desktop-data\data\docker\volumes\DevKinsta\public\test-site\wp-content\plugins` -

So yeah, I think the issue with the UNC path above is due to that WSL network path would need to be mapped to an actual local drive in Windows first  
(with something like: `net use z: \\wsl.localhost\docker-desktop-data`  
where `z:` can be changed with any local drive we want to map/assign for that network path - as long as they don’t exist on our local computer).

After that’s done, the path and its sub-folders and files could be accessed via CMD/PowerShell - similar to what I suggested in [another post here](https://community.kinsta.com/t/open-files-from-devkinsta-on-vsc/2539) (where Visual Studio code was unable to open/edit the WordPress files located in that WSL network path).

regards.  
Agus

---

<div class="post-metadata">

### Author: ![Olivier\_Bigras](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/olivier_bigras/32/5132_2.png) [@Olivier\_Bigras](https://community.kinsta.com/u/Olivier_Bigras)
#### Post date: [November 24, 2025, 6:09pm UTC](https://community.kinsta.com/t/how-do-you-npm-install-in-docker-volume/2363/7 "2025-11-24T18:09:15Z")

</div>

When will this be resolved we need easy npm and composer build with dev kinsta in 2026
