Awesome q2a theme

NPM: text file is busy?

0 like 0 dislike
72 views
Use Laravel Homestead. Downloaded VirtualBox, Vagrant. Successfully installed, configured. How to add dependencies to package.json started error

ETXTBSY: text file is busy, rename ...


In General, the type of this file already occupied by a program and NPM can not edit package.json. I have tried many ways: launched from under the administrator, only some options are tried, nothing helps.

Use Windows 10, NPM 6. Windows new, just installed.
by | 72 views

1 Answer

0 like 0 dislike
Most likely, you will use some of the following solutions: https://github.com/npm/npm/issues/9979

Most likely, here it is:
I am able to resolve my issue now after using the below command:-
$ npm install --no-bin-links
since i had to further install bower so i used:
$ bower install <------- worked fine.
Then i wanted to build my wordpress template sage. I used
$ gulp <---- further gave some error and pointed me to use "npm rebuild node-sass" $ npm rebuild node-sass <- gave again some symbolic link error, I choose below

command which worked fine.

$ npm rebuild node-sass --no-bin-links
Further i was able to use gulp to build.


And here is a detailed description of the causes of the problem:
My guess is that you're both running Linux inside Vagrant on a Windows host, because ETXTBSY is almost always due to Windows not wanting to let the guest OS to remove or move a file. Generally, this happens when you have a cmd.exe process open in a directory or are looking at the folder with Explorer, or have a file in there open in a text editor.

@Stanzilla, if you delete your current node_modules folder and reinstall, it will go from being the deeply nested npm@<3 style tree to the new [email protected] maximally flat tree, which should fix the original problem you were seeing.

@samir1kumar, it looks like you want to run your install with --no-bin-links, because you don't have your Vagrant shared directory configured to support symlinks (this is possible, but not done by default by VirtualBox or Vagrant because of security concerns). This also means you can't use modules linked in your shared directory. I shared some more thoughts about this on Twitter. Vagrant with shared directories seems like it should be the best of both worlds, but there are a surprising number of pitfalls to making it work without issues.
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked May 11, 2019 by faramozzayw
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,187 answers
0 comments
40,796 users