-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 error - can't find /highcharts/highstock.src #4
Comments
Which bundler do you use ? |
systemjs : 0.19.24 |
I think it is better to map sources. Look at the example of loading via systemjs http://plnkr.co/edit/pnkc8Iw9cSrCYn9zr0VZ?p=preview. I am not a specialist in systemjs so would be great if you suggest how to manage this better. |
Thank you for your example. I agree it is best to map sources. To solve my problem I changed my map statement to include '.js' in the key. I thought that setting defaultExtension: 'js' in the packages object in System.config would make it unnecessary to have '.js' in the alias. Clearly, I don't understand systemjs well enough. The following config is what I'm now using in index.html: |
Ok, I just looked again at 'node_modules/angular2-highcharts/dist/Highcharts.js' and I see that the '.js' extension is included in the reference (var Highcharts = require('highcharts/highstock.src.js');) |
Good. |
GET http://localhost:4200/node_modules/angular2-highcharts 404 (Not Found)scheduleTask @ zone.js:101ZoneDelegate.scheduleTask @ zone.js:336Zone.scheduleMacroTask @ zone.js:273(anonymous function) @ zone.js:122send @ VM729:3fetchTextFromURL @ system.src.js:1154(anonymous function) @ system.src.js:1735ZoneAwarePromise @ zone.js:584(anonymous function) @ system.src.js:1734(anonymous function) @ system.src.js:2759(anonymous function) @ system.src.js:3333(anonymous function) @ system.src.js:3600(anonymous function) @ system.src.js:3985(anonymous function) @ system.src.js:4448(anonymous function) @ system.src.js:4700(anonymous function) @ system.src.js:406ZoneDelegate.invoke @ zone.js:323Zone.run @ zone.js:216(anonymous function) @ zone.js:571ZoneDelegate.invokeTask @ zone.js:356Zone.runTask @ zone.js:256drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426 |
angular2-polyfills.js:332 Error: Error: XHR error (404 Not Found) loading http://localhost:3000/highcharts/highstock.src(…)
The app is trying to load /highcharts/highstock.src
In, node_modules/angular2-highcharts/dist/Highcharts.js
I change the reference to: var Highcharts = require('/node_modules/highcharts/highstock.src.js');
Then it works
The text was updated successfully, but these errors were encountered: