EPERM,不允许的操作错误,配置存储 [英] EPERM, operation not permitted error, config store

查看:789
本文介绍了EPERM,不允许的操作错误,配置存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是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

尝试运行像boweryo(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:\Users\me\.config\configstore\insight-yo.yml'
    at Object.fs.openSync (fs.js:427:18)
    at Object.fs.writeFileSync (fs.js:966:15)
    at Object.create.all.set (C:\Users\me\AppData\Roaming\npm\node_modules\yo\node_modules\insight\node_modules\configstore\configstore.js:39:7)
    at Object.Configstore (C:\Users\me\AppData\Roaming\npm\node_modules\yo\node_modules\insight\node_modules\configstore\configstore.js:30:11)
    at new Insight (C:\Users\me\AppData\Roaming\npm\node_modules\yo\node_modules\insight\lib\insight.js:20:16)
    at Object.<anonymous (C:\Users\me\AppData\Roaming\npm\node_modules\yo\bin\yo: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>\.config\configstore\insight-bower.yml上的文件解决了这个问题,bower在运行时会重新创建它.

I solved the problem by just deleting the file at C:\Users\<your username>\.config\configstore\insight-bower.yml, bower will recreate it upon running.

这篇关于EPERM,不允许的操作错误,配置存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆