得到下面的错误。我试着像sudo和我一样跑步。同样的错误。我是Linux薄荷糖Rosa。安装通过了yo调查问卷,但是在权限上失败了,看起来像这样。我是Linux新手。请帮忙。

create bower.json
fs.js:549
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EACCES: permission denied, open '/home/mastermean/bower.json'
    at Error (native)
    at Object.fs.openSync (fs.js:549:18)
    at Object.fs.writeFileSync (fs.js:1156:15)
    at write (/usr/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/commit.js:14:6)
    at DestroyableTransform._transform (/usr/lib/node_modules/generator-angular-fullstack/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/commit.js:43:7)
    at DestroyableTransform.Transform._read (/usr/lib/node_modules/generator-angular-fullstack/node_modules/readable-stream/lib/_stream_transform.js:172:10)
    at DestroyableTransform.Transform._write (/usr/lib/node_modules/generator-angular-fullstack/node_modules/readable-stream/lib/_stream_transform.js:160:12)
    at doWrite (/usr/lib/node_modules/generator-angular-fullstack/node_modules/readable-stream/lib/_stream_writable.js:335:12)
    at writeOrBuffer (/usr/lib/node_modules/generator-angular-fullstack/node_modules/readable-stream/lib/_stream_writable.js:321:5)
    at DestroyableTransform.Writable.write (/usr/lib/node_modules/generator-angular-fullstack/node_modules/readable-stream/lib/_stream_writable.js:248:11)
jul@jul-Inspiron-5558 /home/mastermean $ 

最佳答案

尝试从终端运行此操作:

cd ~
mkdir app
cd app
yo angular-fullstack

(根据yeoman的安装方式,可能需要将最后一个命令运行为sudo yo angular-fullstack。)
文件bower.json似乎没有写权限。您可以通过修复现有的权限来修复这个问题,但是上面的顺序应该允许您不必使用权限进行处理。

关于angularjs - 在Linux本地安装yo Angular 全栈失败,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/34758130/

10-15 08:07