Karios
Karios

Reputation: 115

Error: EINVAL: invalid argument, mkdir 'C:\Users\user\'C:\Users\User\AppData\Roaming\npm

I've just installed nodejs then just to confirm its availability running node -v shows the version of node installed but on running npm -v it displays

Error: EINVAL: invalid argument, mkdir 'C:\Users\user\'C:\Users\User\AppData\Roaming\npm'

tried to find the .npmrc to change the

prefix="D:\\node\\node_global"

I also can't find it.

Upvotes: 1

Views: 7680

Answers (2)

Shahnad S
Shahnad S

Reputation: 1167

open .npmrc file from the 'C:\Users\user'-> edit prefix path to prefix='C:\Users\user\AppData\Roaming\npm'.

Upvotes: 1

SN_1229 Bear
SN_1229 Bear

Reputation: 11

Open the file .npmrc in your User folder, and focus on the setting prefix={path}. Delete the " or ' in the path . Have a try.

Upvotes: 0

Related Questions