我正在尝试在Mac OS Sierra 10.12.6中安装 bower ,但我一直陷入困境。
我已经尝试了大部分已经发布的解决方案,但没有一个有效。
ran_polavieja@your-da-man:/% bower init
? name fgpstudio-fronend
? description Diseño Frontend para FGP Studio
? main file index.html
? keywords
? authors frangp
? license ISC
? homepage https://github.com/franpola/fgpstudio-fronend
? set currently installed components as dependencies? Yes
? add commonly ignored files to ignore list? Yes
? would you like to mark this package as private which prevents it from being accidentally published to the registry? Yes
{
name: 'fgpstudio-fronend',
description: 'Diseño Frontend para FGP Studio',
main: 'index.html',
authors: [
'frangp'
],
license: 'ISC',
homepage: 'https://github.com/franpola/fgpstudio-fronend',
private: true,
ignore: [
'**/.*',
'node_modules',
'bower_components',
'test',
'tests'
]
}
? Looks good? Yes
bower EACCES EACCES: permission denied, open '/bower.json'
Stack trace:
Error: EACCES: permission denied, open '/bower.json'
at Error (native)
Console trace:
Error
at StandardRenderer.error (/usr/local/lib/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
at Logger.<anonymous> (/usr/local/lib/node_modules/bower/lib/bin/bower.js:110:26)
at emitOne (events.js:77:13)
at Logger.emit (events.js:169:7)
at Logger.emit (/usr/local/lib/node_modules/bower/lib/node_modules/bower-logger/lib/Logger.js:29:39)
at /usr/local/lib/node_modules/bower/lib/commands/index.js:48:20
at _rejected (/usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:844:24)
at /usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:870:30
at Promise.when (/usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:1122:31)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/lib/node_modules/q/q.js:788:41)
System info:
Bower version: 1.8.0
Node version: 4.6.0
OS: Darwin 16.7.0 x64
有没有人知道如何摆脱EACCES权限错误?
答案 0 :(得分:0)
能够运行一个命令,你需要设置包含该命令0
的目录的提示路径