javascript Bower - EPERM,取消链接错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25244512/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bower - EPERM, unlink error
提问by David R
I'm encountering the below error stack trace, while I try to install "jQuery" using Bower. Can someone offer some help?
我在尝试使用 Bower 安装“jQuery”时遇到以下错误堆栈跟踪。有人可以提供一些帮助吗?
C:\study\meanApp>bower install jquery --save
bower not-cached git://github.com/jquery/jquery.git#*
bower resolve git://github.com/jquery/jquery.git#*
bower download https://github.com/jquery/jquery/archive/2.1.1.tar.gz
bower retry Download of https://github.com/jquery/jquery/archive/2.1.1.t
ar.gz failed, trying with git..
bower EPERM EPERM, unlink 'C:\Users\UserZ\AppData\Local\Temp\AUserZ\bower\jquery-8680-AaJIqU\archive.tar.gz'
Stack trace:
Error: EPERM, unlink 'C:\Users\UserZ\AppData\Local\Temp\A-UserZ\bower\jqu
ery-8680-AaJIqU\archive.tar.gz'
Console trace:
Trace
at StandardRenderer.error (C:\Users\UserZ\AppData\Roaming\npm\node_module
s\bower\lib\renderers\StandardRenderer.js:72:17)
at Logger.<anonymous> (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bo
wer\bin\bower:110:22)
at Logger.EventEmitter.emit (events.js:95:17)
at Logger.emit (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\nod
e_modules\bower-logger\lib\Logger.js:29:39)
at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\lib\commands\ind
ex.js:40:20
at _rejected (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_
modules\q\q.js:797:24)
at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_modules\q\q
.js:823:30
at Promise.when (C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\no
de_modules\q\q.js:1035:31)
at Promise.promise.promiseDispatch (C:\Users\UserZ\AppData\Roaming\npm\no
de_modules\bower\node_modules\q\q.js:741:41)
at C:\Users\UserZ\AppData\Roaming\npm\node_modules\bower\node_modules\q\q
.js:557:44
System info:
Bower version: 1.3.9
Node version: 0.10.18
OS: Windows_NT 6.1.7601 ia32
P.S: I've gone through the StackOverflow could find nothing related to my error, hence posting this question.
PS:我已经通过 StackOverflow 找不到与我的错误相关的任何内容,因此发布了这个问题。
Thanks in advance, Dave
提前致谢,戴夫
回答by Markus Pscheidt
Cleaning the cache resolved the error for me: npm cache clean
清理缓存为我解决了错误: npm cache clean
回答by molafson
I got the same error "EPERM, unlink" but with a different archive.
我遇到了同样的错误“EPERM,unlink”,但存档不同。
Running these commands resolved the issue for me:
运行这些命令为我解决了这个问题:
- npm uninstall -g bower
- npm update decompress-zip
- npm install -g bower
- npm卸载 -g bower
- npm 更新解压-zip
- npm install -g bower
This link is where I saw to use those commands: https://github.com/bower/bower/issues/798It is the updating of the decompress-zip that has resolved the issue for others as well.
这个链接是我看到使用这些命令的地方:https: //github.com/bower/bower/issues/798这是 decompress-zip 的更新,也解决了其他人的问题。
回答by Hardik Patel
I got this error and ran the bower in verbose mode. And found the error as below:
我收到此错误并以详细模式运行凉亭。并发现错误如下:
bower error SELF_SIGNED_CERT_IN_CHAIN
To resolve this, add below line into .bowerrc created in your default home directory.
要解决此问题,请将以下行添加到在默认主目录中创建的 .bowerrc 中。
"strict-ssl": false
Try bower install
again, it should work.
再试bower install
一次,它应该可以工作。
回答by Derocs
You could try the following sequence. It worked for me. bower cache clean npm uninstall -g bower npm install -g bower bower install jQuery#2.1.1
您可以尝试以下顺序。它对我有用。bower cache clean npm uninstall -g bower npm install -g bower bower install jQuery#2.1.1
回答by dror
I had a similar problem and i resolved it pretty easily; I was trying to bower install while running a server from my machine. I disconnected the server and IDE (webstorm) and it worked.
我有一个类似的问题,我很容易地解决了它;我试图在从我的机器上运行服务器时进行凉亭安装。我断开了服务器和 IDE (webstorm) 的连接,它工作正常。
回答by Deb
I resolved it by running
我通过运行解决了它
bower cache clean
bower cache clean
回答by Nishchit Dhanani
Uninstall your old node (it may be < 0.12.0)
卸载旧节点(它可能 < 0.12.0)
And Install node version > v0.12.0(In my case v0.12.7)
并安装节点版本> v0.12.0(在我的情况下是 v0.12.7)
Then
然后
npm update npm -g
And
和
bower install
回答by Aadil
i also got the same problem and i tried again all uninstalled everything then after i install again gitbash command in gitbash
我也遇到了同样的问题,我再次尝试卸载所有东西,然后在 gitbash 中再次安装 gitbash 命令
$ npm install -g bower // let it execute
once executed
一旦被执行
again command
再次命令
$ bower install bootstrap // let it execute
when executed you got if want more then run more commands :)
执行时,如果想要更多然后运行更多命令,您会得到:)
e.g.
例如
$ bower install script.js
回答by f123
Whenever I encounter this error, what I do is to clean the npm's cache,
每当我遇到这个错误时,我所做的就是清理 npm 的缓存,
npm cache clean
and if it doesn't work, I uninstall the concerned bower component, and install it again.
如果它不起作用,我会卸载相关的凉亭组件,然后重新安装。