[英]Error: EPERM: operation not permitted
at the moment I try to develop an ionic-app with Webstorm. 目前,我尝试使用Webstorm开发一个ionic-app。 But gulp is making some troubles. 但是gulp正在制造一些麻烦。
Installed Packages: 已安装的软件包:
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0",
"gulp-sass": "^2.1.0"
But when I type gulp
or 'ionic serve' in the terminal and run it I get the following error message: 但是,当我在终端中键入gulp
或“离子服务”并运行它时,会收到以下错误消息:
[18:36:00] Using gulpfile ~\app\gulpfile.js
[18:36:00] Starting 'sass'...
stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: EPERM: operation not permitted, open 'C:\Users\Chef\app\www\css\ionic.app.css'
at Error (native)
I am using Windows10x64. 我正在使用Windows10x64。
I tried the following things but none of it works: 我尝试了以下操作,但均无效:
Any advice? 有什么建议吗?
Thanks in advance! 提前致谢!
I noticed that I started having this error when I tried to organize permissions on the directories and files on the project. 我注意到,当我尝试组织项目目录和文件的权限时,我开始出现此错误。
What I noticed that fixed my problem was giving ownership of the directories/files that Gulp needed to create/rewrite to my user, even if I had those files set as 777 I still got this error, only when I changed the ownership to my user it went away. 我注意到,解决了我的问题的是,将Gulp创建/重写所需的目录/文件的所有权提供给了用户,即使我将那些文件设置为777,也只有在将所有权更改为用户时,仍然会出现此错误它消失了。
I think this probably has something to do with NPM and Gulp being installed on my user home directory (I needed to do something like that so I could run them without sudo). 我认为这可能与NPM和Gulp安装在用户主目录中有关(我需要执行类似的操作,以便无需sudo即可运行它们)。 Hope this helps someone. 希望这对某人有帮助。
TL;DR; TL; DR; Setting ownership of directories/files Gulp writes to, to my user, solved the problem for me. 设置目录/文件的所有权对我的用户来说,Gulp可以解决我的问题。
This error indicates that gulp cannot edit (or recreate) the file C:\\Users\\Chef\\app\\www\\css\\ionic.app.css 此错误表明gulp无法编辑(或重新创建)文件C:\\ Users \\ Chef \\ app \\ www \\ css \\ ionic.app.css
Check why the your user does not have access to this file or why is the file on a Read-Only state (SVN lock? other?) 检查您的用户为什么无法访问此文件,或者为什么该文件处于只读状态(SVN锁?其他?)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.