2

我正在使用运行带有“Scotchbox 2.0”(A Vagrant LAMP Stack)的 Vagrant 盒子的 Windows 7 桌面工作,它工作得很好。- https://box.scotch.io

在我的 vagrant box 中,我安装了node 11.0.0& npm 6.4.1——此时是最新版本。

我有一个包含 package.json 文件的目录 - 我运行npm install以在短时间内下载所有依赖项,我在终端中收到以下消息:

npm WARN rollback Rolling back copy-descriptor@0.1.1 failed (this is probably harmless): ETXTBSY: text file is busy, unlink '/var/www/exec/posting/node_modules/copy-descriptor/package.json.3200674018'
npm ERR! path /var/www/exec/posting/node_modules/copy-descriptor/package.json.3200674018
npm ERR! code ETXTBSY
npm ERR! errno -26
npm ERR! syscall rename
npm ERR! ETXTBSY: text file is busy, rename '/var/www/exec/posting/node_modules/copy-descriptor/package.json.3200674018' -> '/var/www/exec/posting/node_modules/copy-descriptor/package.json'

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/vagrant/.npm/_logs/2018-10-30T12_20_53_534Z-debug.log

我已经尝试unlink对它声明的文件执行命令并重新运行npm install,但是我得到了同样的错误(但有更多的包),如上所示我该如何解决这个错误?

这里有类似的问题:- https://github.com/npm/npm/issues/20605

4

1 回答 1

0

降级也为我工作。

这是我降级的方式:

npm install -g npm@5.7.1

于 2019-05-04T14:18:47.373 回答