gund / ng-http-interceptor

Http Interceptor library for Angular
MIT License
104 stars 16 forks source link

Cannot read property 'Observable' of undefinedInterceptableStoreFactory.createStore,: __extends is not defined #136

Closed RobertRajcool closed 7 years ago

gund commented 7 years ago

Please provide repo or plunker which reproduces the problem

zxshinxz commented 7 years ago

I was facing the same issue and I found this issue from other libaray facing same issue: https://github.com/akveo/ng2-smart-table/issues/26

for quick fix, you can change

tsconfig.aot.json of ng-http-interceptor to following and rebuild

{
  "compilerOptions": {
    "declaration": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "noEmitHelpers": false,             //     "noEmitHelpers": true,   --->     "noEmitHelpers": false,
    "lib": ["es6", "dom"],
    "module": "es2015",
    "moduleResolution": "node",
    "outDir": "./dist",
    "sourceMap": true,
    "target": "es5",
    "typeRoots": [
      "./node_modules/@types"
    ]
  },
  "files": [
    "src/index.ts"
  ],
  "angularCompilerOptions": {
    "genDir": "compiled"
  }
}

but, I'm pretty sure there's better way than this.

BTW Thank you for great library :)

gund commented 7 years ago

Hey @zxshinxz thanks for response.

Actually have you tried to include ts-helpers module in your application? Because I'm also using this library in other projects and do not face this issue in none of them.

zxshinxz commented 7 years ago

@gund your right

it was in the README all along! and it works like a charm Thank you for pointing it out :)

gund commented 7 years ago

Cool, thanks for confirming =)