1

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/toastr@2.1.2/toastr.js

How do I go about fixing this?

I have done npm install and jspm install.

Thanks!

Menelaos
  • 23,508
  • 18
  • 90
  • 155
  • Can you share more details like link to plunker or gistrun? According to the error, it can't find `jquery.js` is dist folder. Please check that file exist in correct location. – Ray Apr 19 '18 at 12:18

1 Answers1

2

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']
  }
}
Fred Kleuver
  • 7,797
  • 2
  • 27
  • 38