Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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!

like image 446
Mark Avatar asked Jun 07 '13 16:06

Mark


3 Answers

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.

like image 184
Dio Phung Avatar answered Nov 02 '22 11:11

Dio Phung


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.

like image 42
macGYves Avatar answered Nov 02 '22 10:11

macGYves


For me there were three files at C:\Users\myusername\.config\configstore

(bower-github.yml, insight-bower.json, update-notifier-bower.yml) delted all three

Also disabled the antivirus.

Note: Don't forget to show hidden files.

like image 1
Anil Singh Avatar answered Nov 02 '22 09:11

Anil Singh