.lock文件在尝试生成Yeoman Chrome扩展时受到阻碍

时间:2022-10-24 10:25:40

Just installed a clean copy of yeoman along with generator-chrome-extension. I ran it and all when well until I get to this step:

刚刚安装了一个干净的yeoman副本以及generator-chrome-extension。我一直运行它,直到我完成这一步:

✔ pre-build test passed successfully!
npm WARN optional dep failed, continuing imagemin-jpegtran@0.1.0
npm WARN optional dep failed, continuing imagemin-optipng@0.1.0
npm WARN optional dep failed, continuing imagemin-gifsicle@0.1.1
npm ERR! EEXIST, open '/home/vagrant/.npm/5ac6bb0f-ant-npm-lodash-2-4-1-package-tgz.lock'
File exists: /home/vagrant/.npm/5ac6bb0f-ant-npm-lodash-2-4-1-package-tgz.lock
Move it away, and try again.

npm ERR! System Linux 3.13.0-30-generic
npm ERR! command "/home/vagrant/.nvm/v0.10.32/bin/node" "/home/vagrant/.nvm/v0.10.32/bin/npm" "install"
npm ERR! cwd /home/vagrant/Projects/test.dev/chrome/test
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! path /home/vagrant/.npm/5ac6bb0f-ant-npm-lodash-2-4-1-package-tgz.lock
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! not ok code 0

I tried deleting that .lock file but each time I'm given the error that it doesn't exist.

我尝试删除.lock文件,但每次我收到错误,它不存在。

What could be causing this block and how can I get around it?

什么可能导致这个块,我怎么能绕过它?

EDIT: I figured out why I can't delete the file. The generator appends .STALE to the end. I deleted all the stale lock files just in case, but still no go. Why if it renamed it, is it somehow blocking the progression past this point?

编辑:我弄清楚为什么我不能删除该文件。生成器将.STALE附加到最后。我删除了所有过时的锁文件以防万一,但仍然没有去。为什么如果重命名它,它是否以某种方式阻止了这一点的进展?

Also, in answer to a question, the owner of .npm is vagrant and group is vagrant.

另外,在回答问题时,.npm的所有者是流浪汉,团体是流浪汉。

1 个解决方案

#1


2  

Good news! See #6318 for details, but I now believe (with more confidence this time than last) that this issue has been addressed for real. npm -g install npm@2.1.1 or npm -g install npm@next will get you the fixed version of npm. If you run into additional problems, please open new issues, as the code that caused this issue is no longer in npm.

好消息!有关详细信息,请参阅#6318,但我现在相信(这次比上次更有信心)此问题已得到解决。 npm -g install npm@2.1.1或npm -g install npm @ next将为您提供npm的固定版本。如果您遇到其他问题,请打开新问题,因为导致此问题的代码不再是npm。

https://github.com/npm/npm/issues/6309

#1


2  

Good news! See #6318 for details, but I now believe (with more confidence this time than last) that this issue has been addressed for real. npm -g install npm@2.1.1 or npm -g install npm@next will get you the fixed version of npm. If you run into additional problems, please open new issues, as the code that caused this issue is no longer in npm.

好消息!有关详细信息,请参阅#6318,但我现在相信(这次比上次更有信心)此问题已得到解决。 npm -g install npm@2.1.1或npm -g install npm @ next将为您提供npm的固定版本。如果您遇到其他问题,请打开新问题,因为导致此问题的代码不再是npm。

https://github.com/npm/npm/issues/6309