最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Mismatched anonymous define() module: function(){"use strict";return axe} - Stack Overflow

programmeradmin0浏览0评论

I have this odd error for some reason:

"Mismatched anonymous define() module: function(){"use strict";return axe} .html#mismatch"

After setting some JS breakpoints, I found the error source here:

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

So, realizing it was in the dynamically generated "browserlink" code, I disabled "browserlink" in Visual Studio, and the problem went away (everything is perfect, no issues). It seems that function(){"use strict";return axe} is getting stuck in the requirejs queue? ('defQueue') This happens when the web app is first launched, BUT there are no errors YET. The error occurs only later on, when I do something that uses requirejs. After some analysis, I found that this call in requirejs:

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

fails here:

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

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

The question is, can anyone help me figure out why this conflict may exist? Is this a bug of some sort with VS browserlink?

I have this odd error for some reason:

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

After setting some JS breakpoints, I found the error source here:

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

So, realizing it was in the dynamically generated "browserlink" code, I disabled "browserlink" in Visual Studio, and the problem went away (everything is perfect, no issues). It seems that function(){"use strict";return axe} is getting stuck in the requirejs queue? ('defQueue') This happens when the web app is first launched, BUT there are no errors YET. The error occurs only later on, when I do something that uses requirejs. After some analysis, I found that this call in requirejs:

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

fails here:

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

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

The question is, can anyone help me figure out why this conflict may exist? Is this a bug of some sort with VS browserlink?

Share Improve this question edited Aug 23, 2016 at 16:33 James Wilkins asked Aug 20, 2016 at 3:31 James WilkinsJames Wilkins 7,3674 gold badges52 silver badges78 bronze badges 2
  • 2 Your first solution saved my life today. Thank you – Ryan Bennett Commented Aug 22, 2016 at 17:56
  • Glad I could help ;) – James Wilkins Commented Aug 23, 2016 at 16:32
Add a comment  | 

2 Answers 2

Reset to default 12

This seems to be related to WebAccessibilityChecker so try to disable the extension, then it should work again.

I already created an issue for that here.

I did mention this in the question, but for those looking for solutions, one work around is to also disable "browserlink" in visual studio for now.

发布评论

评论列表(0)

  1. 暂无评论