error “ETXTBSY: text file is busy” on npm install

后端 未结 9 2186
谎友^
谎友^ 2020-12-09 08:16

When running npm install [any package] or even npm install on homestead I get the following error:

npm ERR! ETXTBSY: text file is b         


        
9条回答
  •  天命终不由人
    2020-12-09 08:43

    i had to delete the node_modules folder first, then i did

    sudo chmod a+x .
    

    for making sure i got the privilege to do anything on the machine, then i

    sudo npm install --no-bin-links
    

    no bin links is required in vagrant from my experience because these VM don't support bin links (correct me if im wrong). Then i just

    sudo npm run dev
    

    at this point some people might encounter no cross-env found error. In that case, just delete cross-env in package.json file and run it again. It worked for me but some people still encounter the same problem. Might worth to give it a shot.

提交回复
热议问题