当前位置:网站首页>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!!
边栏推荐
- 【虹科案例】3D数据如何成为可操作的信息?– 对象检测和跟踪
- Pure JS implementation determines whether the IP is pinged
- version `ZLIB_ 1.2.9‘ not found (required by /lib64/libpng16.so.16)
- 现在网上开股票账户安全吗?选择国有券商,最快8分钟开户成功
- 使用递归形成多级目录树结构,附带可能是全网最详细注释。
- [technique of planting grass] spit blood and clean up, and take you to collect goose feathers in a fancy way! Do not spread!!!
- 应用配置管理,基础原理分析
- 持续测试和质量保障的关系
- [ICPR 2021] tiny object detection in aerial images
- Relationship between continuous testing and quality assurance
猜你喜欢

Alibaba interview question: multi thread related

飞桨产业级开源模型库:加速企业AI任务开发与应用

毕业设计-论文写作笔记【毕设题目类型、论文写作细节、毕设资料】

C语言:结构体数组实现找出最低分学生记录

Shardingsphere-proxy-5.0.0 implementation of capacity range partition (V)

分别用SVM、贝叶斯分类、二叉树、CNN实现手写数字识别

苹果Iphone14搭载北斗导航系统,北斗VS GPS有哪些优势?

Real time computing framework: Flink cluster construction and operation mechanism

Isn't this another go bug?

What should I pay attention to in the interview of artificial intelligence technology?
随机推荐
Pad User Guide
paddle使用指南
Open source model library of flying propeller industry: accelerating the development and application of enterprise AI tasks
DML operation
13 `bs_duixiang.tag标签`得到一个tag对象
想开户炒股,通过网上进行股票开户安全吗?-
[redis advanced ziplist] if someone asks you what is a compressed list? Please dump this article directly to him.
杂乱的知识点
【CVPR 2020】会议版本:A Physics-based Noise Formation Model for Extreme Low-light Raw Denoising
Data management: business data cleaning and implementation scheme
[applet] indicator of relative path and absolute path
What problems need to be solved by MES management system in the era of intelligent manufacturing
[SPRS J P & RS 2022] small target detection module: a normalized Gaussian Wasserstein distance for tiny object detection
规律/原理/规则/法则/定理/公理/本质/定律
【Redis进阶之ZipList】如果再有人问你什么是压缩列表?请把这篇文章直接甩给他。
[Hongke case] how can 3D data become operable information Object detection and tracking
【小程序】相对路径和绝对路径的表示符
现在网上开股票账户安全吗?选择国有券商,最快8分钟开户成功
Real time computing framework: Flink cluster construction and operation mechanism
After the deployment of Beidou navigation system, why didn't we launch a high-precision map similar to Google maps?