Search code examples
npmaureliasystemjsjspm

How to I debug systemJS error loading js as "" from


I am getting the following error:

system.src.js:123 Uncaught (in promise) Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:8000/dist/jquery.js
    Error: XHR error (404 Not Found) loading http://localhost:8000/dist/jquery.js
    Error loading http://localhost:8000/dist/jquery.js as "jquery" from http://localhost:8000/jspm_packages/npm/[email protected]/toastr.js

How do I go about fixing this?

I have done npm install and jspm install.

Thanks!


Solution

  • You need to make sure that jquery is mapped to the correct path in node_modules and also any modules that depend on jquery have the dependency explicitly declared:

    map: {
      'jquery' : 'path_to_jquery'
    },
    meta: {
      'file_that depends_on_jquery' : {
        deps: ['jquery']
      }
    }