EPERM, operation not permitted error, config store

I know this is a common error with node but all my troubleshooting techniques seem to be failing.

  • Windows 7 (32-bit)
  • Node@0.10.10
  • npm@1.2.25

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.

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)

Essentially, it seems the node process can't write to this .config folder.

I've tried the following to troubleshoot:

  • 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?

Thanks!

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.

It worked for me to delete the .yml file inside the configstore which was causing the problem. In my case it was "update-notifier-bower.yml", in yours it is probably "insight-yo.yml".

After a reinstallation of bower (npm -g install bower) the file reappeared, but this time it caused no harm.

It has also been reported that the deactivation of the anti-virus software solved the issue.

For me navigating to the file with the File Explorer caused a pop up to appear which granted me permission to access the file.

After that nodemon ran without problems.