If you are attempting to learn Durandal JS and getting “Script error for: knockout” from their website’s HTML Starter Kit (producing a blank screen), here is your fix.

Apparently, the devs have continued to update the files in this training tutorial, but ave not updated the tutorial to reflect the new file names.

This is a simple problem with file names in the tutorial text. Notice the tutorial’s main.js below

JAVASCRIPTview code
requirejs.config({
  paths: {
    'text': '../lib/require/text',
    'durandal':'../lib/durandal/js',
    'plugins' : '../lib/durandal/js/plugins',
    'transitions' : '../lib/durandal/js/transitions',
    'knockout': '../lib/knockout/knockout-2.3.0',
    'jquery': '../lib/jquery/jquery-1.9.1'
    } 
});

knockout-2.3.0 is no longer supplied in the files. As of this article, the zip file contains 3.1.0.

Simply change the number and you should be good to go. Enjoy!

JAVASCRIPTview code
requirejs.config({
  paths: {
    'text': '../lib/require/text',
    'durandal':'../lib/durandal/js',
    'plugins' : '../lib/durandal/js/plugins',
    'transitions' : '../lib/durandal/js/transitions',
    'knockout': '../lib/knockout/knockout-3.1.0',
    'jquery': '../lib/jquery/jquery-1.9.1'
    } 
});

Solid Tip: Be sure to check the lib folder to see which versions of files you have at the time you download the “HTML Starter Kit.” It could change after this article appears.