0

Trouble starting Mojito app

When I try to start my Mojito application, I get the following error:

\u2716 There was an error starting the application:
\u2716 Cannot read property 'documentElement' of null
        TypeError: Cannot read property 'documentElement' of null
    at Object.fn (/home/y/lib/node_modules/mojito/node_modules/yui/dom-base/dom-base-min.js:7:50)
    at [object Object]._attach (/home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:701:33)
    at [object Object].<anonymous> (/home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:968:33)
    at Object._finish (/home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:6432:19)
    at Object._onSuccess (/home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:6477:14)
    at Object.<anonymous> (/home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:6674:24)
    at [object Object].<anonymous> (/home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:6736:30)
    at /home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:3791:26
    at /home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:3814:21
    at /home/y/lib/node_modules/mojito/node_modules/yui/yui-nodejs/yui-nodejs.js:3840:21

\u2716 Mojito was not started!

Any idea why I might be getting this error?


by
2 Replies
  • Yes. This happens because one of your files with either common or server affinity has a direct (or secondary, tertiary...) DOM dependency. You can see from the stack trace that YUI fails to load the dom module, because there is no window. You should upgrade to mojito 0.3.28 (if not already) and look at the first few lines of the console output after mojito start. There it will show a warning, which explains which of your components is having a DOM dependency.
    0
  • See also 0.3.28 release notes:
    https://github.com/yahoo/mojito/wiki/ReleaseNotes0_3_28
    0

Recent Posts

in Yahoo! Mojito