当前位置:网站首页>Error reported using worker: uncaught domexception: failed to construct 'worker': script at***
Error reported using worker: uncaught domexception: failed to construct 'worker': script at***
2022-06-24 00:56:00 【AzeShinja】
Problem solving process :
The screenshot of error reporting is as follows :

There is a high probability of this error vue.config Configuration problem of , First put my original configuration
// Solve the packaging error
parallel: false,
chainWebpack: (config) => {
// set worker-loader
config.module
.rule('worker')
.test(/\.worker\.js$/)
.use('worker-loader')
.loader('worker-loader')
.end();
config.module.rule('js').exclude.add(/\.worker\.js$/);
config.plugin('define').tap((args) => {
const [define] = args;
Object.assign(define, {
IS_APPLET: JSON.stringify(true),
UNIQUE_MARK: JSON.stringify(uniqueMark),
});
return args;
});
},
Bloggers have found the above configuration on the Internet , When you find that you have it, start the project browser and report Error in title .
Simply use Baidu translation to translate : On safety grounds worker It can't run locally balabala. Then the direction deviated a little , I have read many articles and said that I should worker Deploy files to the server . These people are numb at first sight , This is not quite outrageous ?
The key to the solution :
Last , The following configurations have been found to solve the problem of error reporting and can be used ,it works!
There are some articles on the Internet that do not options Call to , So an error is reported after using their code . The specific reason is that I don't know why I add... Because of my limited technology options That solves the problem =.= It's a little pity , I'm still curious . If any enthusiastic netizens know about it, please give me some advice !

.options({
inline: 'fallback',
filename: 'workerName.[hash].worker.js',
})
Add this options It solves the problem of error reporting
Digression
I tried it before worker-plugin Is it possible not to configure so many , But I reported an error in the process of using it and didn't solve it . Finally, the configuration was done honestly =.= Don't forget to introduce worker-loader!!
边栏推荐
- Niu Xuechang's anniversary celebration: software promotion, limited time and free registration code!
- 【小程序】实现双列商品效果
- What do NLP engineers do? What is the work content?
- [iccv workshop 2021] small target detection based on density map: coarse-grained density map guided object detection in aerial images
- [day 25] given an array of length N, count the number of occurrences of each number | count hash
- Chinese guide to accompanist component library - glide, hot
- 2022考研经验分享【初试、择校、复试、调剂、校招与社招】
- C language: structure array implementation to find the lowest student record
- 数据管理:业务数据清洗,落地实现方案
- C语言:结构体数组实现找出最低分学生记录
猜你喜欢

13 `bs_duixiang.tag标签`得到一个tag对象

利用Scanorama高效整合异质单细胞转录组

LSF打开Job idle information以看job的cpu time/elapse time使用情况

What are the two types of digital factories

钟珊珊:被爆锤后的工程师会起飞|OneFlow U

Icml'22 | progcl: rethinking difficult sample mining in graph contrast learning

机器学习中 TP FP TN FN的概念

Real time computing framework: Flink cluster construction and operation mechanism

数字化工厂可以分为哪两类

Everything I see is the category of my precise positioning! Open source of a new method for saliency map visualization
随机推荐
利用Scanorama高效整合异质单细胞转录组
CVPR2022 | 可精简域适应
飞桨产业级开源模型库:加速企业AI任务开发与应用
[applet] when compiling the preview applet, a -80063 error prompt appears
Mip-NeRF:抗混叠的多尺度神经辐射场ICCV2021
Chinese guide to accompanist component library - glide, hot
If you want to open an account for stock trading, is it safe to open an account online-
Is it safe to open a stock account online now? Select a state-owned securities firm, and the fastest time to open an account is 8 minutes
version `ZLIB_ 1.2.9‘ not found (required by /lib64/libpng16.so.16)
一次 MySQL 误操作导致的事故,「高可用」都顶不住了!
【虹科案例】3D数据如何成为可操作的信息?– 对象检测和跟踪
C语言:递归实现N的阶乘
使用递归形成多级目录树结构,附带可能是全网最详细注释。
Data management: business data cleaning and implementation scheme
【SPRS J P & RS 2022】小目标检测模块:A Normalized Gaussian Wasserstein Distance for Tiny Object Detection
WinSCP和PuTTY的安装和使用
[SPRS J P & RS 2022] small target detection module: a normalized Gaussian Wasserstein distance for tiny object detection
【CVPR 2020】会议版本:A Physics-based Noise Formation Model for Extreme Low-light Raw Denoising
Activity 的 36 大难点,你会几个?,安卓面试2020
Interview notes for Android outsourcing workers for 3 years. You still need to go to a large factory to learn and improve when you have the opportunity. Interview questions for Android Development Int