问题描述
我知道这是 node
的常见错误,但我所有的故障排除技术似乎都失败了.
I know this is a common error with node
but all my troubleshooting techniques seem to be failing.
- Windows 7(32 位)
- Node@0.10.10
- npm@1.2.25
尝试运行 bower
和 yo
(Yeoman) 等包命令时会出现此问题.为了我的理智,在执行这些命令时,我在以管理员身份运行的 Node.js 命令提示符中.
This issue occurs when trying to run package commands like bower
and yo
(Yeoman). For my sanity, I am in a Node.js command prompt running as an Administrator when executing these commands.
例如,下面是使用 yo
运行它的输出:
For example, here is the output for running this with yo
:
Error: EPERM, operation not permitted 'C:Usersme.configconfigstoreinsight-yo.yml'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.writeFileSync (fs.js:966:15)
at Object.create.all.set (C:UsersmeAppDataRoaming
pm
ode_modulesyo
ode_modulesinsight
ode_modulesconfigstoreconfigstore.js:39:7)
at Object.Configstore (C:UsersmeAppDataRoaming
pm
ode_modulesyo
ode_modulesinsight
ode_modulesconfigstoreconfigstore.js:30:11)
at new Insight (C:UsersmeAppDataRoaming
pm
ode_modulesyo
ode_modulesinsightlibinsight.js:20:16)
at Object.<anonymous (C:UsersmeAppDataRoaming
pm
ode_modulesyoinyo:25:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
基本上,似乎 node
进程无法写入此 .config
文件夹.
Essentially, it seems the node
process can't write to this .config
folder.
我已尝试以下方法进行故障排除:
I've tried the following to troubleshoot:
node
和各个包的全新安装(按任何可能的顺序)- 为
.config
文件夹中的所有用户设置写入权限 - 阅读 npm 存储库中的 Windows 用户注释后重新安装
git
- Fresh installs of
node
and the individual packages (in every conceivable order) - Setting write privileges for all users on the
.config
folder - Reinstalling
git
after reading the notes for Windows users in the npm repository
对此问题有任何想法或故障排除技术吗?
Any thoughts or troubleshooting techniques on this issue?
谢谢!
推荐答案
我通过删除 C:Users<your username>.configconfigstoreinsight-bower 中的文件解决了这个问题.yml
,bower 会在运行时重新创建它.
I solved the problem by just deleting the file at C:Users<your username>.configconfigstoreinsight-bower.yml
, bower will recreate it upon running.
这篇关于EPERM,不允许操作错误,配置存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!