我在安装bootstrap时遇到了这个问题。有什么建议?
bower not-cached https://github.com/twbs/bootstrap.git#*
bower resolve https://github.com/twbs/bootstrap.git#*
bower checkout bootstrap#v3.3.6
**bower EACCES EACCES: permission denied, open '/Users/criticus/.cache/bower/packages/478ab1d28ba78f550601bf536eea62f5-3.3.6.lock'**
堆栈追踪:
Error: EACCES: permission denied, open '/Users/criticus/.cache/bower/packages/478ab1d28ba78f550601bf536eea62f5-3.3.6.lock'
at Error (native)
控制台跟踪:
Error
at StandardRenderer.error (/Users/criticus/NPM/lib/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
at Logger.<anonymous> (/Users/criticus/NPM/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 (/Users/criticus/NPM/lib/node_modules/bower/lib/node_modules/bower-logger/lib/Logger.js:29:39)
at /Users/criticus/NPM/lib/node_modules/bower/lib/commands/index.js:48:20
at _rejected (/Users/criticus/NPM/lib/node_modules/bower/lib/node_modules/q/q.js:844:24)
at /Users/criticus/NPM/lib/node_modules/bower/lib/node_modules/q/q.js:870:30
at Promise.when (/Users/criticus/NPM/lib/node_modules/bower/lib/node_modules/q/q.js:1122:31)
at Promise.promise.promiseDispatch (/Users/criticus/NPM/lib/node_modules/bower/lib/node_modules/q/q.js:788:41)
System info:
Bower version: 1.7.9
Node version: 4.4.7
OS: Darwin 15.5.0 x64
我已经尝试了
sudo bower install --allow-root
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
并没有这些帮助。
答案 0 :(得分:1)
尝试删除您的bower缓存:
sudo rm -r ~/.cache/bower