简体   繁体   English

npm 错误! 在“npx live-server”时编码 EPERM

[英]npm ERR! code EPERM when "npx live-server"

I am trying to do "npx live-server."我正在尝试做“npx live-server”。 but it failed.但它失败了。 It might be the problem of my username(with whitespaces).这可能是我的用户名(带空格)的问题。 So that I follow the steps from npm - EPERM mkdir: operation not permitted on Windows .因此,我按照npm - EPERM mkdir: operation not permitted on Windows中的步骤进行操作。 I changed my username in local machine and then run npm config set cache "C:\Users\Firstname~1\AppData\Roaming\npm-cache" --global我在本地计算机上更改了我的用户名,然后运行npm config set cache "C:\Users\Firstname~1\AppData\Roaming\npm-cache" --global

but in git bash, it still shows the original username with whitespace.但在 git bash 中,它仍然显示带有空格的原始用户名。 Could anyone help me with this please!!!谁能帮我解决这个问题!!! 在此处输入图像描述

在此处输入图像描述

thank you so much!太感谢了!

You can try running this in terminal by opening it as administrator.您可以通过以管理员身份打开它来尝试在终端中运行它。 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM