gpt4 book ai didi

javascript - 不匹配的匿名 define() 模块 : function() {"use strict";return axe}

转载 作者:可可西里 更新时间:2023-11-01 02:55:00 26 4
gpt4 key购买 nike

出于某种原因我有这个奇怪的错误:

"Mismatched anonymous define() module: function(){"use strict";return axe} http://requirejs.org/docs/errors.html#mismatch"

设置了一些JS断点后,发现错误源在这里:

a [browserlink] Line 363: 
/*! aXe v2.0.5
* Copyright (c) 2016 Deque Systems, Inc.
* ...etc... */
...etc...&&define([],function(){"use strict";return axe}),...etc...

因此,意识到这是在动态生成的“browserlink”代码中,我在 Visual Studio 中禁用了“browserlink”,问题就消失了(一切都很完美,没有问题)。似乎 function(){"use strict";return axe} 卡在了 requirejs 队列中? ('defQueue') 当网络应用首次启动时会发生这种情况,但目前还没有错误。错误只会在稍后发生,当我做一些使用 requirejs 的事情时。经过一番分析,发现requirejs中的这个调用:

//Grab defines waiting in the global queue.
intakeDefines();

这里失败了:

while (defQueue.length) {
args = defQueue.shift();
if (args[0] === null) {
return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1]));

其中 args == [null,[],"function(){"use strict";return axe}"]

问题是,谁能帮我弄清楚为什么会存在这种冲突?这是 VS 浏览器链接的某种错误吗?

最佳答案

这似乎与 WebAccessibilityChecker 有关,因此请尝试禁用该扩展,然后它应该会再次运行。

我已经为此创建了一个问题 here .

关于javascript - 不匹配的匿名 define() 模块 : function() {"use strict";return axe},我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39050189/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com