Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Not able to run application #89

Closed
kharatps02 opened this issue Dec 23, 2016 · 12 comments
Closed

Not able to run application #89

kharatps02 opened this issue Dec 23, 2016 · 12 comments

Comments

@kharatps02
Copy link

I added this feature as per given instruction but getting following error in browser .

Uncaught ReferenceError: __extends is not defined
at interceptable-http.js:6
at Object. (interceptable-http.js:19)
at webpack_require (bootstrap b4bbcca…:52)
at Object. (main.bundle.js:77524)
at webpack_require (bootstrap b4bbcca…:52)
at Object. (main.bundle.js:77602)
at webpack_require (bootstrap b4bbcca…:52)
at Object. (main.bundle.js:15364)
at webpack_require (bootstrap b4bbcca…:52)

  • package.json ---------------
    "dependencies": {
    "@angular/common": "2.2.3",
    "@angular/compiler": "2.2.3",
    "@angular/compiler-cli": "2.2.3",
    "@angular/core": "2.2.3",
    "@angular/forms": "2.2.3",
    "@angular/http": "2.2.3",
    "@angular/platform-browser": "2.2.3",
    "@angular/platform-browser-dynamic": "2.2.3",
    "@angular/router": "3.2.3",
    "@types/jasmine": "2.5.38",
    "@types/node": "^6.0.42",
    "angular-cli": "1.0.0-beta.19-3",
    "angular2-toaster": "^1.1.0",
    "bootstrap": "^3.3.7",
    "codelyzer": "~2.0.0-beta.1",
    "core-js": "^2.4.1",
    "express": "^4.14.0",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.2.1",
    "ng-spin-kit": "^2.0.0",
    "ng2-bootstrap": "^1.1.16",
    "ng2-http-interceptor": "^1.2.6",
    "ng2-uploader": "^1.6.2",
    "protractor": "4.0.9",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "^1.1.1",
    "ts-node": "1.2.1",
    "tslint": "^4.0.2",
    "typescript": "~2.0.3",
    "webdriver-manager": "10.2.5",
    "zone.js": "^0.6.23"
    },
@gund
Copy link
Owner

gund commented Dec 23, 2016

Please make sure you have imported ts-helpers module in your app.

@gund gund added the wontfix label Dec 23, 2016
@kharatps02
Copy link
Author

Thanks, Its working for me now .

@ghost
Copy link

ghost commented Feb 17, 2017

This is still not working for me.

Uncaught ReferenceError: __extends is not defined
at interceptable-http.js:6
at Object. (interceptable-http.js:19)
at webpack_require (bootstrap 7fa372f…:52)
at Object. (main.bundle.js:176143)
at webpack_require (bootstrap 7fa372f…:52)
at Object. (main.bundle.js:176086)
at webpack_require (bootstrap 7fa372f…:52)
at Object. (main.bundle.js:176048)
at webpack_require (bootstrap 7fa372f…:52)
at Object. (main.bundle.js:105538)
at webpack_require (bootstrap 7fa372f…:52)
at Object. (user-details.service.ts:39)
at webpack_require (bootstrap 7fa372f…:52)
at Object. (main.bundle.js:39279)
at webpack_require (bootstrap 7fa372f…:52)

I have the following in tsconfig.json file

{
"compilerOptions": {
"baseUrl": "",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es6",
"dom"
],
"mapRoot": "./",
"module": "es6",
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"noEmitHelpers": false,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
}
}

I have the following in package.json

"dependencies": {
"@angular/common": "2.4.6",
"@angular/compiler": "2.4.6",
"@angular/core": "2.4.6",
"@angular/forms": "2.4.6",
"@angular/http": "2.4.6",
"@angular/material": "^2.0.0-alpha.11-3",
"@angular/platform-browser": "2.4.6",
"@angular/platform-browser-dynamic": "2.4.6",
"@angular/router": "3.4.6",
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.20",
"@ngrx/core": "^1.0.2",
"@ngrx/effects": "^2.0.0",
"@ngrx/store": "^2.1.2",
"angular2-modal": "^2.0.0-beta.12",
"core-js": "^2.4.1",
"immutability-helper": "^2.1.1",
"immutable": "^3.8.1",
"jsplumb": "2.2.6",
"lodash": "^4.17.4",
"moment": "^2.14.1",
"ng-http-interceptor": "^2.0.3",
"normalizr": "^3.1.0",
"reflect-metadata": "0.1.8",
"rxjs": "^5.0.1",
"ts-helpers": "^1.1.1",
"zone.js": "^0.7.2"
},
"devDependencies": {
"@angular/compiler-cli": "2.4.6",
"@ngrx/store-devtools": "^3.0.1",
"@ngrx/store-log-monitor": "^3.0.1",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.21",
"awesome-typescript-loader": "2.2.1",
"codelyzer": "~2.0.0-beta.1",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.9",
"ts-node": "1.2.1",
"tslint": "^4.4.2",
"typescript": "^2.1.6",
"webdriver-manager": "10.2.5"
}
}

I upgraded my typescript to latest version to @2.1.6
I included ts-helpers in module.

@gund
Copy link
Owner

gund commented Feb 17, 2017

Weird. I'm not sure if there is something to do with the typescript version but can you try to compile with noEmitHelpers: true option?

If that won't work could you please provide a plunkr?

Thanks

@gund gund reopened this Feb 17, 2017
@ghost
Copy link

ghost commented Feb 17, 2017

noEmitHelpers: true didn't work for me.
Somehow on commenting this line //__extends(InterceptableHttp, _super); in interceptable-http.js it works as expected. Not sure if this would create any other issues.
But I am able to intercept now.

@gund
Copy link
Owner

gund commented Feb 18, 2017

Hm, it's weird how it works without __extends =)
Anyway it would be great if you are able to provide plunkr so I can have a look into call stacks.

Thanks

@teswar
Copy link

teswar commented Feb 22, 2017

I too got the Uncaught ReferenceError: __extends is not defined error. And bypassed it as @idnesh did.
image

@gund
Copy link
Owner

gund commented Feb 22, 2017

Yeah I see the error but I need a repro plunk or repo because it seems like you just did not include ts-helpers module

@teswar
Copy link

teswar commented Feb 22, 2017

Stupid me. Thanks @grund that resolved it ...

@gund
Copy link
Owner

gund commented Mar 2, 2017

I'm closing this as it seems to be resolved.

@gund gund closed this as completed Mar 2, 2017
@parthivreddy27
Copy link

need to add ts-helpers in package.json file?

@gund
Copy link
Owner

gund commented Apr 18, 2017

If you're using v3+ - just install tslib module locally.
If before v3 - yes, you should include ts-helpers yourself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants