{"action":"closed","issue":{"url":"https://api.github.com/repos/IdentityModel/oidc-client-js/issues/150","repository_url":"https://api.github.com/repos/IdentityModel/oidc-client-js","labels_url":"https://api.github.com/repos/IdentityModel/oidc-client-js/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/IdentityModel/oidc-client-js/issues/150/comments","events_url":"https://api.github.com/repos/IdentityModel/oidc-client-js/issues/150/events","html_url":"https://github.com/IdentityModel/oidc-client-js/issues/150","id":182885621,"number":150,"title":"'oidc-client.d.ts' is not a module : What am I doint wrong?","user":{"login":"CraigEaston","id":17124248,"avatar_url":"https://avatars.githubusercontent.com/u/17124248?v=3","gravatar_id":"","url":"https://api.github.com/users/CraigEaston","html_url":"https://github.com/CraigEaston","followers_url":"https://api.github.com/users/CraigEaston/followers","following_url":"https://api.github.com/users/CraigEaston/following{/other_user}","gists_url":"https://api.github.com/users/CraigEaston/gists{/gist_id}","starred_url":"https://api.github.com/users/CraigEaston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CraigEaston/subscriptions","organizations_url":"https://api.github.com/users/CraigEaston/orgs","repos_url":"https://api.github.com/users/CraigEaston/repos","events_url":"https://api.github.com/users/CraigEaston/events{/privacy}","received_events_url":"https://api.github.com/users/CraigEaston/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IdentityModel/oidc-client-js/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-10-13T19:59:21Z","updated_at":"2016-10-20T20:23:57Z","closed_at":"2016-10-20T20:23:57Z","body":"Hi,\r\n\r\nPretty new to Angular2 and Typescript, but familiar with oidc-client and IDServer version 3.\r\nI'm getting this error when my gulp file task runs:\r\n```\r\nStarting 'ts'...\r\nscripts\\OidcManager.Service.ts(2,57): error TS2656: Exported external package typings file\r\n'C:/Projects/[.....]/node_modules/oidc-client/oidc-client.d.ts' is not a module.\r\nPlease contact the package author to update the package definition.\r\n```\r\n\r\nGulfFile:\r\n```\r\n/// <binding />\r\nvar ts = require('gulp-typescript');\r\nvar gulp = require('gulp');\r\nvar clean = require('gulp-clean');\r\n\r\nvar destPath = './wwwroot/libs/';\r\n\r\n// Delete the dist directory\r\ngulp.task('clean', function () {\r\n   return gulp.src(destPath)\r\n       .pipe(clean());\r\n});\r\n\r\ngulp.task(\"scriptsNStyles\", () => {\r\n   gulp.src([\r\n           'core-js/client/**',\r\n           'es6-shim/**',\r\n           'systemjs/dist/system.src.js',\r\n           'reflect-metadata/**',\r\n           'rxjs/**',\r\n           'zone.js/dist/**',\r\n           '@angular/**',\r\n           'jquery/dist/jquery.*js',\r\n           'bootstrap/dist/js/bootstrap.*js',\r\n           'oidc-client/dist/oidc-client.js'\r\n   ], {\r\n      cwd: \"node_modules/**\"\r\n   })\r\n       .pipe(gulp.dest(\"./wwwroot/libs\"));\r\n});\r\n\r\nvar tsProject = ts.createProject('scripts/tsconfig.json');\r\ngulp.task('ts', function (done) {\r\n   //var tsResult = tsProject.src()\r\n   var tsResult = gulp.src([\r\n           \"scripts/*.ts\"\r\n   ])\r\n       .pipe(ts(tsProject), undefined, ts.reporter.fullReporter());\r\n   return tsResult.js.pipe(gulp.dest('./wwwroot/appScripts'));\r\n});\r\n\r\ngulp.task('watch', ['watch.ts']);\r\n\r\ngulp.task('watch.ts', ['ts'], function () {\r\n   return gulp.watch('scripts/*.ts', ['ts']);\r\n});\r\n\r\ngulp.task('default', ['scriptsNStyles', 'watch']);\r\n```\r\nHere is my tsconfig.json:\r\n```\r\n{\r\n   \"compilerOptions\": {\r\n      \"emitDecoratorMetadata\": true,\r\n      \"experimentalDecorators\": true,\r\n      \"module\": \"commonjs\",\r\n      \"noEmitOnError\": true,\r\n      \"noImplicitAny\": false,\r\n      \"outDir\": \"../wwwroot/appScripts/\",\r\n      \"removeComments\": false,\r\n      \"sourceMap\": true,\r\n      \"target\": \"es5\",\r\n      \"moduleResolution\": \"node\"\r\n   },\r\n  \"exclude\": [\r\n    \"node_modules\",\r\n    \"typings/index\",\r\n    \"typings/index.d.ts\"\r\n  ]\r\n}\r\n```\r\n\r\nAnd finally a snippet from my ts file :\r\n```\r\nimport { Injectable, OnInit, EventEmitter } from '@angular/core';\r\nimport { UserManager, Log, MetadataService, User } from 'oidc-client';\r\n\r\n@Injectable()\r\nexport class OidcManagerService {\r\n   mgr: UserManager;\r\n   //userLoadededEvent: EventEmitter<User> = new EventEmitter<User>();\r\n   currentUser: User;\r\n   loggedIn: boolean = false;\r\n   setting: any;\r\n```"}}
{"actor":{"display_login":"CraigEaston"}}