Reputation: 71
We're having a problem on one of the computers while trying to load the project.
this is our package.json:
{
...
"jspm": {
"dependencies": {
"angular2": "npm:angular2@^2.0.0-beta.8",
"d3": "npm:d3@^3.5.16",
"reflect-metadata": "npm:reflect-metadata@^0.1.3",
"zone.js": "npm:zone.js@^0.6.1"
},
"devDependencies": {}
},
...
}
the config.js is:
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: false,
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
map: {
}
});
i deleted the map for the question, it creates it again when you do jspm i.
The index.html is:
<html>
<head>
<script src="temp/angular2-polyfills.js"></script>
<script src="jspm_packages/system.src.js"></script>
<script src="config.js"></script>
<base href="/">
<script>
System.import('reflect-metadata').then(function(){
System.import('boot.js');
});
</script>
</head>
<body>
<my-app>Loading...</my-app>
</body>
</html>
without the reflect meta-data angular 2 fails to load (anybody got an idea how to fix that?).
after running the dependencies installation (npm i , jspm i). We try to access localhost:8000, and the jspm fails to load the angular 2 project with the following problem:
Failed to load resource: the server responded with status of 404 (Not found) http://locallhost:8000/.js
it seems there's something wrong with the dependency loading inside the systemjs, we obviously don't have a reference to an empty file, and it's not code related because the same code works on other machines. anybody got an idea?
Upvotes: 1
Views: 146
Reputation: 2021
I think you need a transpiler defined, you have to setup babel or typescript,... etc.
jspm dl-loader babel
or you can use jspm init
to amend it.
see also the documentation: https://github.com/jspm/jspm-cli/blob/master/docs/getting-started.md
Upvotes: 0