Zachary Helfrich
Zachary Helfrich

Reputation: 88

npm not installing packages on WSL

I keep running into an issue with npm not installing packages.

npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /mnt/c/Users/zhelf/downloads/test/node_modules/ansi-regex
npm ERR! dest /mnt/c/Users/zhelf/downloads/test/node_modules/.ansi-regex.DELETE
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/mnt/c/Users/zhelf/downloads/test/node_modules/ansi-regex' -> '/mnt/c/Users/zhelf/downloads/test/node_modules/.ansi-regex.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/zhelf/.npm/_logs/2020-08-05T16_06_33_155Z-debug.log

this is the error it keeps giving me I am running windows 10 with WSL and ubuntu 20.04 I have tried through the regular terminal and the terminal in vscode as well. I have tried googling the problem have cleared the npm cache and I get the same problem I was trying to install express but tried other packages as well and I keep getting the same error.

Upvotes: 2

Views: 4531

Answers (1)

Zachary Helfrich
Zachary Helfrich

Reputation: 88

Ok, I found the issue I needed to run the npm install -g build-tools, and package install it again.

Upvotes: 1

Related Questions