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.