my error:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (traceur, line 0)
Error: invoke@http://localhost:3000/node_modules/zone.js/dist/zone.js:323:34
runGuarded@http://localhost:3000/node_modules/zone.js/dist/zone.js:230:54
http://localhost:3000/node_modules/zone.js/dist/zone.js:206:40
Error loading http://localhost:3000/traceur
Error loading http://localhost:3000/ts/app.js
my folder structure is like this:
index.htmn
package.json
systemjs.config.js
typings.json
->ts/app.js
->node_modules/*
->typings/*
I tried changing destination path of my source app file but did not have any luck.
index.html
<html>
<head>
<title>First App - Hello world</title>
<script src="node_modules/es6-shim/es6-shim.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').then(null, console.error.bind(console));
</script>
<body>
<gs-test></gs-test>
</body>
</html>
in systemjs.config file i tried changing map part for my app but still the same. I also tried with changing different version of libraries but did not help.
systemjs.config.js
// See also: https://angular.io/docs/ts/latest/quickstart.html
(function(global) {
// map tells the System loader where to look for things
var map = {
'app': 'ts',
'rxjs': 'node_modules/rxjs',
'@angular': 'node_modules/@angular'
};
// packages tells the System loader how to load when no filename and/or no extension
var packages = {
'app': { main: 'app.js', defaultExtension: 'js'},
'rxjs': { defaultExtension: 'js' },
'angular2-in-memory-web-api': { defaultExtension: 'js' }
};
var packageNames = [
'@angular/common',
'@angular/compiler',
'@angular/core',
'@angular/http',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
'@angular/router',
'@angular/router-deprecated',
'@angular/testing',
'@angular/upgrade',
];
// add package entries for angular packages in the form '@angular/common': { main: 'index.js', defaultExtension: 'js' }
packageNames.forEach(function(pkgName) {
packages[pkgName] = { main: 'index.js', defaultExtension: 'js' };
});
var config = {
map: map,
packages: packages
}
// filterSystemConfig - index.html's chance to modify config before we register it.
if (global.filterSystemConfig) { global.filterSystemConfig(config); }
System.config(config);
})(this);
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
]
}
could be something with typings but i guess then td file would be missing. I did "typing install" before starting first time app.
typings.json
{
"ambientDependencies": {
"es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654",
"jasmine": "registry:dt/jasmine#2.2.0+20160412134438",
"node": "registry:dt/node#4.0.0+20160509154515"
}
}
Please let me know what could be wrong with my setup.
tnx! miha