# Npm ERR! Error: EACCES: permission denied, rename (WSL with VS Code open)

**URL:** <https://forum.openzeppelin.com/t/npm-err-error-eacces-permission-denied-rename-wsl-with-vs-code-open/1549>\
**Category:** General\
**Created:** [October 14, 2019, 3:31am UTC](https://forum.openzeppelin.com/t/npm-err-error-eacces-permission-denied-rename-wsl-with-vs-code-open/1549 "2019-10-14T03:31:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [October 14, 2019, 3:31am UTC](https://forum.openzeppelin.com/t/npm-err-error-eacces-permission-denied-rename-wsl-with-vs-code-open/1549/1 "2019-10-14T03:31:22Z")

</div>

I have been getting `npm ERR! Error: EACCES: permission denied, rename` errors when doing `npm install` on a project using Windows Subsystem for Linux (WSL) with Visual Studio Code (VS Code) open on the project.

I am running the extension `Remote - WSL`.

If I close VS Code and retry the install, then I get no errors.

The following comment on an open Issue on WSL appears to describe my issue:

> <https://github.com/Microsoft/WSL/issues/14#issuecomment-527481479>
>
> While trying to install a packge with npm (for example lodash) it fails with error message:
> npm ERR! Linux 3.4.0+
> npm ERR! argv...

---

<div class="post-metadata">

**Author:** ![Leiv\_Hendrickx](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/leiv_hendrickx/32/1355_2.png) [@Leiv\_Hendrickx](https://forum.openzeppelin.com/u/Leiv_Hendrickx)\
**Post date:** [November 5, 2019, 8:10am UTC](https://forum.openzeppelin.com/t/npm-err-error-eacces-permission-denied-rename-wsl-with-vs-code-open/1549/2 "2019-11-05T08:10:38Z")

</div>

had the exact same issue. simply closing VS Code did the trick.

thx!

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [November 5, 2019, 8:36am UTC](https://forum.openzeppelin.com/t/npm-err-error-eacces-permission-denied-rename-wsl-with-vs-code-open/1549/3 "2019-11-05T08:36:17Z")

</div>

Hi @Leiv_Hendrickx,

Welcome to the community 👋.

It looks like VSCode with WSL Remote is doing some locking.

Closing VS Code and running the `npm install` command again works with no errors.

It is more of an annoyance.

---

<div class="post-metadata">

**Author:** ![Rohit\_Jain](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/rohit_jain/32/1761_2.png) [@Rohit\_Jain](https://forum.openzeppelin.com/u/Rohit_Jain)\
**Post date:** [February 23, 2020, 5:47am UTC](https://forum.openzeppelin.com/t/npm-err-error-eacces-permission-denied-rename-wsl-with-vs-code-open/1549/4 "2020-02-23T05:47:29Z")

</div>

Closing Remote Connection in WSL and reconnecting to it made it work for me.
