获取"错误:EACCES:权限被拒绝,mkdir' / dir /'在尝试生成ASP.NET Web应用程序时

时间:2015-09-17 18:27:09

标签: asp.net yeoman yeoman-generator

我按照here说明如何使用yeoman为ASP.Net应用程序安装生成器。但是当我运行yo aspnet并尝试生成Web应用程序时,我收到以下错误:

Error: EACCES: permission denied, mkdir '/path/to/project/ProjectName'
at Error (native)
at Object.fs.mkdirSync (fs.js:799:18)
at Function.sync (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/mkdirp/index.js:71:13)
at write (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/commit.js:13:12)
at DestroyableTransform._transform (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/commit.js:42:7)
at DestroyableTransform.Transform._read (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
at doWrite (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
at writeOrBuffer (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
at DestroyableTransform.Writable.write (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)

1 个答案:

答案 0 :(得分:1)

显然我没有对我试图生成应用程序的文件夹的写访问权限,尽管拥有它。一个简单的chmod修复了它。