NPM Install Error: Operation not permitted, rename

Source: Internet
Author: User

Running the NPM install command to install the dependency pack, on the Mac vagrant installed on the virtual machine is not a problem, on the Aliyun CentOS also no problem, but in the Windows environment is also the same vagrant installed environment of the same virtual machine is unsuccessful, the error is as follows:

NPM err! Error:EPERM:operation not permitted, rename '/usr/share/nginx/html/tanteng.me/node_modules/duplexify '-> '/usr/ Share/nginx/html/tanteng.me/node_modules/.duplexify. DELETE '


operation-permitted

You have previously encountered a symbol error in the NPM installation on Windows, and the solution is sudo npm install–no-bin-links, plus the following parameters.

Lists the installation directories for Node.js, and the permissions properties of the directory are as follows:

Npm-chown

Here to execute the command:

sudo chown vagrant:vagrant n node npm

Remember to also clear the NPM cache:

NPM Cache Clean

Perform the sudo npm install–no-bin-links,windows environment again even if the virtual machine needs to take the following parameters.

This time the problem is solved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.