0

I am using DOJO and JavaScript. The code is working fine with other browser except Chrome. Whenever I am trying to load the page in Chrome, I am getting following error

         { Error: defineAlreadyDefined
                at makeError(dojo.js:119)
                at async(dojo.js:1911)
                at dojo.js:1941
            (anonymous) @ dojo.js:1862 }  

At line number 119 of dojo.js file I have written following code:-

       { makeError = function(error, info){
                        return mix(new Error(error), {src:"dojoLoader", info:info}); }
                    },

At line 1911 I have written following code

   { (this.dojoConfig || this.djConfig || this.require || {}, }

What is the issue ? Can anyone solve this ? I am getting only this issue in chrome.In other browser its working absolutely fine. Thanks in advance. :-) "

SAMUEL
  • 8,098
  • 3
  • 42
  • 42
Nishant
  • 19
  • 3
  • 2
    Please provide a [Minimal, Complete, and Verifiable](http://stackoverflow.com/help/mcve) example of your attempt, so we can try to solve your problem and explain why your own attempt failed - that way you can learn something useful for your future development, as well as getting an answer to this single problem. – SAMUEL Mar 03 '17 at 09:23
  • Line 1911 of what? – Chris Sharp Mar 05 '17 at 13:05

2 Answers2

1

Well, When I faced the same error in my project; below are suggestions I followed to track and fix the error-

The main cause of this error if you are using two different which exposes same "define" method.

However if you are loading same library twice in your application in that case also it gives the same error.

This is the simler error raised on GitHub-

https://github.com/odoe/iLikeItHere/issues/1

Hoping above hint will help to track/resolve your issue :)

Vikash Pandey
  • 5,407
  • 6
  • 41
  • 42
1

The issue could be caused by a external libraries which could use isown define function.

Make sure any external libraries which use their own define like requirejs are always added in header before dojo.

Related answer: Dojo 1.9 build 'multipleDefine' error while loading locale

Community
  • 1
  • 1
GibboK
  • 71,848
  • 143
  • 435
  • 658