Vue2 project npm run build packaging error ERROR Error: EBUSY: resource busy or locked, rmdir....

Vue2 npm run build packaging error ERROR Error: EBUSY: resource busy or locked, rmdir...

insert image description here

Situation 1 (the situation I encountered)

During the packaging process of the project, an error message ERROR Error: EBUSY: resource busy or locked, rmdir '...\dist' was suddenly reported. The
error message can be seen that the dist file generated by the previous packaging was deleted during the packaging process and an error was reported. Then check whether the dist file has been deleted. Open is in use. . .

Solution:

1. Find and open or use the dist file, and close it (fairy operation: when the packaged file is uploaded to the server, it is still in the process of uploading, and then the server is disconnected, causing the dist folder to be used all the time, which leads to my error -_ -)
2. Restart the computer, simple and rude

Situation 2 (the situation encountered when searching online)

When I started packaging and reporting errors, I went to Google blindly and saw the same error on the Internet at first glance, ERROR Error: EBUSY: resource busy or locked, unlink... In fact, the last keyword is different, and my own is rmdir.... It hurts me to restart the editor for a long time, it's useless -_-, post them all for a record! !

Solution:

Restart the editor, solved!

Guess you like

Origin blog.csdn.net/weixin_42508580/article/details/126649367