I'll record my first attempt at vue3.0. When I started the project, I got an error message saying "Cannot find module 'worker_threads'". I checked and found that it was because the node version on my computer was too low. I checked the version. node -v v11.2.0 Then upgrade your node version and execute the startup command. npm install -gn (remember to add sudo on Mac) latest Summary: You need to upgrade node.js to version 12 or above to solve the problem of Vue3.0 reporting the error Cannot find module 'worker_threads'. Further reading: Solution to the error Cannot find module 'xxx'.When packaging with webpack, there will be an error of Cannot find module 'XXX', which means that a certain module cannot be found. Here is a solution: Directly perform npm install to repackage; If this problem still occurs after npm install repackaging, you can delete the node_modules folder and clear the cache at the same time, as follows:
The above is the editor's introduction to the solution of Vue3.0 error Cannot find module 'worker_threads'. I hope it will be helpful to everyone. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Graphic tutorial on installing MySQL database and configuring environment variables on Mac
>>: Detailed explanation of the application of meta tags in mobile platform development
Table of contents Preface use Component Writing D...
Preface At work, I need to count the materials su...
1. Check the software installation path: There is...
This article shares the specific code of the vue-...
Due to the company's business requirements, t...
mktemp Create temporary files or directories in a...
The previous article introduced two methods to ch...
Table of contents Integrity constraints Definitio...
Use HTML to write a dynamic web clock. The code i...
Core SQL statements MySQL query statement that do...
Table of contents Docker Installation Nvidia-dock...
Table of contents What happens if a piece of code...
This article shares the specific code of vue+swip...
CSS scroll bar style modification code .scroll::-...
1. Introduction When a web project is published o...