Objective
Recently found a problem, run the npm install
command to install a dependency pack, on the Mac vagrant installed on the virtual machine is not a problem, on the Aliyun CentOS is not a problem, but in the Windows environment is also a vagrant installed environment of the same virtual machine is not successful, 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 '
You have previously encountered a symbol error on Windows NPM installation dependencies, and the solution is sudo npm install –no-bin-links
to add the following parameters.
Lists the installation directories for Node.js, and the permissions properties of the directory are as follows:
Here to execute the command:
sudo chown vagrant:vagrant n node npm
Remember to also clear the NPM cache:
Again sudo npm install –no-bin-links
, the Windows environment requires the following parameters to be taken even on the virtual machine.
Well, this time the problem will be solved. This is the full content of this article, I hope this article will be able to meet the same problem friends have helped.