我按照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)
答案 0 :(得分:1)
显然我没有对我试图生成应用程序的文件夹的写访问权限,尽管拥有它。一个简单的chmod
修复了它。