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
Preface In case of application bug or DBA misoper...
Preface To be honest, I've been feeling very ...
ffmpeg is a very powerful audio and video process...
Table of contents 1. Introduction 2. Deployment E...
Table of contents 1. v-for: traverse array conten...
We often use click events in the a tag: 1. a href=...
Effect: <div class="imgs"> <!-...
Preface Today, after synchronizing the order data...
This article uses examples to illustrate the func...
IE gave us a headache in the early stages of deve...
By using Nginx virtual domain name configuration,...
During the development and debugging process, it ...
Table of contents Preface 1. How to write functio...
This article shares the specific code of vue+elem...
This article shares with you how to use thinkphp5...