简体   繁体   中英

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

How do I go about fixing this?

I have done npm install and jspm install .

Thanks!

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']
  }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM