“Error: ETXTBSY” when installing the package with

2019-06-03 17:42发布

I tried to install gruntjs package via npm, but the command

npm install grunt --save-dev

received an error:

npm ERR! error rolling back Error: ETXTBSY, unlink   '/home/me/www/public_html/test/try/node_modules/grunt/node_modules/lodash/lodash.js'
npm ERR! error rolling back  grunt@0.4.4 { [Error: ETXTBSY, unlink '/home/me/www/public_html/test/try/node_modules/grunt/node_modules/lodash/lodash.js']
npm ERR! error rolling back   stack: 'Error: ETXTBSY, unlink \'/home/me/www/public_html/test/try/node_modules/grunt/node_modules/lodash/lodash.js\'',
npm ERR! error rolling back   errno: -26,
npm ERR! error rolling back   code: 'ETXTBSY'

Trying to install gulp led to a similar error.

All that I try on a virtual machine with Ubuntu 12, my host-system is Windows 8.

标签: gruntjs npm
2条回答
你好瞎i
2楼-- · 2019-06-03 17:52

I found effective running the VM with admin rights, after reading and following this answer.

查看更多
叼着烟拽天下
3楼-- · 2019-06-03 18:11

I was having the same issue and I`m also new to all of this, but I found somewhere else to type the following

sudo npm install grunt -g

This worked for me and hope it helps you

Another thing that might help would be to avoid symlink creations, so you would type

sudo npm install grunt -g --no-bin-link
查看更多
登录 后发表回答