Closed giangdhwhtbr closed 8 years ago
Hello, @giangdhwhtbr.
Can I see the content of your index.html
and config.js
? Both should be in client/dev
.
Also, do you have reflect-metadata
listed as a dependency in your package.json
?
Here is my index.html
<!doctype html>
<html>
<head>
<base href="/" >
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="shortcut icon" type="image/ico" href="favicon.png" />
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css"/>
<link href="../client/dev/bower_components/bootstrap/dist/css/bootstrap-theme.min.css" rel="stylesheet"
type="text/css"/>
<link href="../client/dev/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="../client/dev/shared/css/styles.css" rel="stylesheet" type="text/css"/>
<link href="../client/dev/shared/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="../client/dev/shared/css/animate.css" rel="stylesheet" type="text/css"/>
<!--<link href="../client/dev/shared/css/lumino.css" rel="stylesheet" type="text/css"/>-->
<title>Knowledge sharing network</title>
</head>
<body>
<kshare-app></kshare-app>
<script src="./core-js/client/shim.min.js"></script>
<script src="./systemjs/dist/system.js?rev=@@hash"></script>
<script src="./reflect-metadata/Reflect.js?rev=@@hash"></script>
<script src="./zone.js/dist/zone.js?rev=@@hash"></script>
<script src="./config.js?rev=@@hash"></script>
<script>
System.import("./index.js");
</script>
<script src="../client/dev/bower_components/jquery/dist/jquery.js"></script>
<script src="../client/dev/bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="../client/dev/shared/js/modernizr.custom.js"></script>
</body>
</html>
And the config.js
System.config({
defaultJSExtensions: true,
paths: {
'@angular/*': './@angular/*',
"rxjs/*": "./rxjs/*",
"reflect-metadata": "./reflect-metadata"
},
map: {
"rxjs": "./rxjs"
},
packages: {
'@angular/common': {
main: 'index'
},
'@angular/compiler': {
main: 'index'
},
'@angular/core': {
main: 'index'
},
'@angular/http': {
main: 'index'
},
'@angular/platform-browser-dynamic': {
main: 'index'
},
'@angular/platform-browser': {
main: 'index'
},
'@angular/router': {
main: 'index'
},
"rxjs": {
defaultExtension: 'js'
},
'dist': {
defaultExtension: 'js',
format: 'register'
}
}
});
Seems all good. What about your package.json
?
Package.json
{
"name": "CapstoneProjectKshare",
"version": "0.0.1",
"main": "src/CapstoneProjectKshare.js",
"scripts": {
"start": "node index",
"watch": "gulp",
"dev": "tsc && concurrently \"npm start\" \"gulp\"",
"build-dev": "node index && gulp client.watch",
"build-dist": "gulp client.build:dist",
"test-client": "gulp client.unit_test",
"test-server": "mocha ./tests/server/**/*.js --recursive --check-leaks --reporter min --compilers js:babel-register",
"coverage-server": "istanbul cover ./node_modules/mocha/bin/_mocha -- tests/**/*.js --compilers js:babel-register",
"coveralls-server": "istanbul cover ./node_modules/mocha/bin/_mocha -- tests/**/*.js --compilers js:babel-register --report lcovonly && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"dependencies": {
"@angular/common": "^2.0.0-rc.1",
"@angular/compiler": "^2.0.0-rc.1",
"@angular/core": "^2.0.0-rc.1",
"@angular/http": "^2.0.0-rc.1",
"@angular/platform-browser": "^2.0.0-rc.1",
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
"@angular/router": "^2.0.0-rc.1",
"@angular/router-deprecated": "^2.0.0-rc.1",
"acl": "^0.4.9",
"bluebird": "^3.3.4",
"body-parser": "^1.5.0",
"express": "~4.13.4",
"express-content-length-validator": "1.0.0",
"helmet": "^0.7.1",
"lodash": "^4.6.1",
"mongoose": "^4.4.7",
"morgan": "^1.5.2",
"newrelic": "^1.18.2",
"passport": "^0.3.2",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "^0.19.24",
"typescript": "^1.8.9",
"validator": "^5.3.0",
"zone.js": "^0.6.12"
},
"devDependencies": {
"karma-ng-html2js-preprocessor": "^0.1.2",
"aliv": "~1.1.5",
"del": "^1.1.1",
"gulp": "^3.9.0",
"babel-register": "^6.7.2",
"babel-preset-es2015": "^6.1.18",
"babel-preset-stage-0": "^6.1.18",
"protractor": "^3.1.0",
"wiredep": "^2.2.2",
"browser-sync": "^2.5.2",
"require-dir": "^0.3.0",
"gulp-concat": "^2.4.3",
"gulp-coveralls": "^0.1.3",
"gulp-typescript": "^2.9.2",
"gulp-clean-css": "^2.0.3",
"gulp-rename": "^1.2.0",
"gulp-rev-append": "^0.1.6",
"gulp-uglify": "^1.1.0",
"gulp-imagemin": "^2.4.0",
"gulp-htmlmin": "^1.3.0",
"gulp-util": "^3.0.3",
"jasmine-core": "^2.1.3",
"run-sequence": "^1.1.5",
"karma": "^0.12.28",
"karma-chrome-launcher": "^0.1.7",
"karma-coverage": "^0.2.7",
"karma-firefox-launcher": "^0.1.3",
"karma-ie-launcher": "^0.1.5",
"karma-jasmine": "^0.3.3",
"karma-opera-launcher": "^0.1.0",
"karma-phantomjs-launcher": "^0.1.4",
"karma-safari-launcher": "^0.1.1",
"mocha": "^2.4.5",
"chai": "^3.5.0",
"coveralls": "^2.11.2",
"istanbul": "^0.3.5",
"concurrently": "^2.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/giangdhwhtbr@gmail.com/CapstoneProjectKshare.git"
},
"author": "giangdhwhtbr@gmail.com",
"license": "MIT",
"bugs": {
"url": "https://github.com/giangdhwhtbr@gmail.com/CapstoneProjectKshare/issues"
},
"homepage": "https://github.com/giangdhwhtbr@gmail.com/CapstoneProjectKshare",
"engines": {
"node": "stable"
}
}
All good too.
Could you try the following, please?
node_modules
;npm install
again;tsc
;npm run dev
.I've done all of the steps but the project still not work.
This is the bugs log when I run tsc
node_modules/@angular/common/src/directives/ng_class.d.ts(72,35): error TS2304: Cannot find name 'Set'.
node_modules/@angular/common/src/facade/async.d.ts(27,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/async.d.ts(28,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/common/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/common/src/facade/lang.d.ts(70,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/common/src/facade/promise.d.ts(2,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(8,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(9,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(10,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(10,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(11,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(11,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(12,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(12,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/facade/promise.d.ts(13,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/forms/directives/select_control_value_accessor.d.ts(18,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/common/src/pipes/async_pipe.d.ts(29,29): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/pipes/async_pipe.d.ts(35,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/pipes/async_pipe.d.ts(37,39): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/common/src/pipes/async_pipe.d.ts(39,44): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(39,88): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(99,42): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/application_ref.d.ts(174,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(24,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/change_detection/differs/default_keyvalue_differ.d.ts(26,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(105,123): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/di/reflective_provider.d.ts(105,165): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/async.d.ts(27,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/async.d.ts(28,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/collection.d.ts(1,25): error TS2304: Cannot find name 'MapConstructor'.
node_modules/@angular/core/src/facade/collection.d.ts(2,25): error TS2304: Cannot find name 'SetConstructor'.
node_modules/@angular/core/src/facade/collection.d.ts(4,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(4,39): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(7,9): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(8,30): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(11,43): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(12,27): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(14,23): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(15,25): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/collection.d.ts(100,41): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/collection.d.ts(101,22): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/collection.d.ts(102,25): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/facade/lang.d.ts(70,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/facade/promise.d.ts(2,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(8,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(9,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(10,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(10,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(11,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(11,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(12,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(12,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/facade/promise.d.ts(13,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/component_resolver.d.ts(8,53): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/component_resolver.d.ts(12,44): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(62,148): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(103,144): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(108,139): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/linker/dynamic_component_loader.d.ts(109,135): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/core/src/reflection/reflector.d.ts(28,22): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/reflection/reflector.d.ts(30,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/reflection/reflector.d.ts(32,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/reflection/reflector.d.ts(34,15): error TS2304: Cannot find name 'Map'.
node_modules/@angular/core/src/reflection/reflector.d.ts(36,16): error TS2304: Cannot find name 'Set'.
node_modules/@angular/core/src/testability/testability.d.ts(40,20): error TS2304: Cannot find name 'Map'.
node_modules/@angular/http/src/headers.d.ts(29,18): error TS2304: Cannot find name 'Map'.
node_modules/@angular/http/src/headers.d.ts(45,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/http/src/url_search_params.d.ts(11,16): error TS2304: Cannot find name 'Map'.
node_modules/@angular/platform-browser-dynamic/platform_browser_dynamic.d.ts(75,90): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/directives/router_outlet.d.ts(27,54): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/directives/router_outlet.d.ts(33,51): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/directives/router_outlet.d.ts(38,56): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/directives/router_outlet.d.ts(47,65): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/directives/router_outlet.d.ts(58,60): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/async.d.ts(27,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/async.d.ts(28,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/router-deprecated/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/router-deprecated/src/facade/lang.d.ts(70,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(2,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(8,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(9,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(10,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(10,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(11,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(11,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(12,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(12,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/facade/promise.d.ts(13,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/instruction.d.ts(125,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/instruction.d.ts(161,25): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/instruction.d.ts(179,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/instruction.d.ts(182,25): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/interfaces.d.ts(21,107): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/interfaces.d.ts(39,104): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/interfaces.d.ts(57,109): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/interfaces.d.ts(80,109): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/interfaces.d.ts(102,114): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/lifecycle/lifecycle_annotations.d.ts(29,100): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/route_config/route_config_impl.d.ts(105,19): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/route_definition.d.ts(20,20): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/route_definition.d.ts(35,20): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/route_registry.d.ts(52,66): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(56,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(68,46): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(86,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(99,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(107,64): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(112,85): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(114,51): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(116,72): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(122,48): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(128,70): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(140,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(144,29): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(150,19): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router-deprecated/src/router.d.ts(162,70): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/async.d.ts(27,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/async.d.ts(28,45): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/lang.d.ts(4,17): error TS2304: Cannot find name 'Map'.
node_modules/@angular/router/src/facade/lang.d.ts(5,17): error TS2304: Cannot find name 'Set'.
node_modules/@angular/router/src/facade/lang.d.ts(70,59): error TS2304: Cannot find name 'Map'.
node_modules/@angular/router/src/facade/promise.d.ts(2,14): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(8,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(9,38): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(10,35): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(10,93): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(11,34): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(11,50): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(12,32): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(12,149): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/facade/promise.d.ts(13,43): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/interfaces.d.ts(22,72): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/router.d.ts(60,33): error TS2304: Cannot find name 'Promise'.
node_modules/@angular/router/src/router.d.ts(71,56): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(10,66): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(66,60): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/Observable.d.ts(66,70): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/observable/PromiseObservable.d.ts(22,31): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/observable/PromiseObservable.d.ts(23,26): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(7,59): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(7,69): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(9,9): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(10,26): error TS2304: Cannot find name 'Promise'.
node_modules/rxjs/operator/toPromise.d.ts(10,36): error TS2304: Cannot find name 'Promise'.
I don't change anything from your config, but the app still crashed. Can you help me through teamviewer? I am so appreciate
Run typings install
to get rid of the typings errors. And I let me know how it goes.
I won't be able to help you through team viewer now, I'm at work, but when I get home I can help you.
Completely off topic
You might want to look at something other than Team Viewer. https://www.reddit.com/r/technology/comments/4m7ay6/teamviewer_has_been_hacked_they_are_denying/
Thanks for the heads up, @rahulswaminathan!
Any news, @giangdhwhtbr?
@ericmdantas, I'm so appreciate with your enthusiasm. I finally found the problem of my project. May be I left out something while upgrade the project to @angular. So that I must change some thing from the original source: In my index.html
<script src="node_modules/core-js/client/shim.min.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>
<!-- 2. Configure SystemJS -->
<script src="config.js"></script>
<script>
System.import("client/dev/index.js");
</script>
And in the config.js I changed the paths:
paths: {
'@angular/*': 'node_modules/@angular/*',
"rxjs/*": "node_modules/rxjs/*",
"reflect-metadata": "node_modules/reflect-metadata"
}
Awesome!
Just to point out what might've happened: In earlier versions of the generator, say 1.6
, 1.7
~ the server would serve files directly from the root - so you'd have to map the node_modules/*
in the index.html
/config.js
. For 1.8
, for security reasons, that changed, and now the server only knows how to serve stuff from either client/dev
, client/dist
or directly inside node_modules
- not from root anymore.
I'll close this since the main issue was solved, but feel free to point any other doubts/bugs.
@giangdhwhtbr 👍 adding "reflect-metadata": "node_modules/reflect-metadata" to my paths fixed my problem. Thank you for adding this info!
Hi there,
I've just update my project from angular2 beta15 to @angular. But my project got an error: /node_modules/@angular/core/src/util/decorators.js:165 throw 'reflect-metadata shim is required when using class decorators'; ^ reflect-metadata shim is required when using class decorators
Please help me, thank you so much