当前位置:网站首页>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!!
边栏推荐
- numpy. linalg. Lstsq (a, B, rcond=-1) parsing
- CVPR2022 | 可精简域适应
- [applet] indicator of relative path and absolute path
- 对抗训练理论分析:自适应步长快速对抗训练
- Kitten paw: FOC control 15-mras method of PMSM
- 实时计算框架:Spark集群搭建与入门案例
- Empty encoded password warning reason
- Is it safe to open an account online? What conditions need to be met?
- 股票网上开户安全吗?需要满足什么条件?
- ShardingSphere-proxy-5.0.0容量范围分片的实现(五)
猜你喜欢

Real time computing framework: Flink cluster construction and operation mechanism

实时计算框架:Spark集群搭建与入门案例

C language: on the right shift of matrix

使用递归形成多级目录树结构,附带可能是全网最详细注释。

Common core resource objects of kubernetes

【虹科案例】3D数据如何成为可操作的信息?– 对象检测和跟踪

Data management: business data cleaning and implementation scheme

13 `bs_duixiang.tag标签`得到一个tag对象
![[digital signal] spectrum refinement based on MATLAB analog window function [including Matlab source code 1906]](/img/b3/ad289400e9c74f6f1f533a7d560d5c.jpg)
[digital signal] spectrum refinement based on MATLAB analog window function [including Matlab source code 1906]

牛学长周年庆活动:软件大促限时抢,注册码免费送!
随机推荐
Pure JS implementation determines whether the IP is pinged
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
Common core resource objects of kubernetes
Everything I see is the category of my precise positioning! Open source of a new method for saliency map visualization
产业互联网时代将依靠源自于产业本身的产品、技术和模式来实现的
Social recruitment interview is indispensable -- 1000 interview questions for Android engineers from Internet companies
Interview notes for Android outsourcing workers for 3 years. I still need to go to a large factory to learn and improve. As an Android programmer
同行评议论文怎么写
[ICPR 2021] tiny object detection in aerial images
Delegation attack of Intranet penetration and lateral mobility
Security | warm tips: security incidents on the cloud have intensified recently. Please do a good job in backup monitoring of cloud security protection!
【小程序】相对路径和绝对路径的表示符
【小程序】实现双列商品效果
【小程序】编译预览小程序时,出现-80063错误提示
C language: recursively implementing factorial of n
Application configuration management, basic principle analysis
Android App bundle exploration, client development interview questions
WinSCP和PuTTY的安装和使用
What problems need to be solved by MES management system in the era of intelligent manufacturing
这不会又是一个Go的BUG吧?