Search code examples
javascriptpluginsrequirejsdurandal

Durandal plugins not loading


When I start my durandal app the plugins are quite temporamental and when they report being installed they work fine, when they report being loaded they do not.

In my code I have the lines

app.configurePlugins({
router: true,
dialog: true,
widget: true
});

My browser console says:

Plugin:Installed plugins/router
Plugin:Loaded plugins/dialog
Plugin:Installed plugins/widget

Sometimes dialog is 'Installed' too and router is 'Loaded'. Regardless whichever plugin is 'Loaded' is then not useable. I have a

define(["plugins/dialog"],
function (dialog){
    dialog.show("message");
}

'dialog' is an object but it doesn't have a show method on. If the app starts and the plugin says 'loaded' it works fine. Refreshing the page, cleaning the solution etc. are the only ways I have to try and get it to work.

What does it mean that the Plugin is 'Loaded' rather than 'Installed'?


Solution

  • If you are running on Visual Studio then disabled this plugin as it changes some of the plugins loaded by DurandalJs.