{"action":"closed","issue":{"url":"https://api.github.com/repos/TypeStrong/ts-node/issues/391","repository_url":"https://api.github.com/repos/TypeStrong/ts-node","labels_url":"https://api.github.com/repos/TypeStrong/ts-node/issues/391/labels{/name}","comments_url":"https://api.github.com/repos/TypeStrong/ts-node/issues/391/comments","events_url":"https://api.github.com/repos/TypeStrong/ts-node/issues/391/events","html_url":"https://github.com/TypeStrong/ts-node/issues/391","id":243096669,"number":391,"title":"ts-node fails when tsc runs ok","user":{"login":"leoasis","id":328001,"avatar_url":"https://avatars3.githubusercontent.com/u/328001?v=4","gravatar_id":"","url":"https://api.github.com/users/leoasis","html_url":"https://github.com/leoasis","followers_url":"https://api.github.com/users/leoasis/followers","following_url":"https://api.github.com/users/leoasis/following{/other_user}","gists_url":"https://api.github.com/users/leoasis/gists{/gist_id}","starred_url":"https://api.github.com/users/leoasis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leoasis/subscriptions","organizations_url":"https://api.github.com/users/leoasis/orgs","repos_url":"https://api.github.com/users/leoasis/repos","events_url":"https://api.github.com/users/leoasis/events{/privacy}","received_events_url":"https://api.github.com/users/leoasis/received_events","type":"User","site_admin":false},"labels":[{"id":236391278,"url":"https://api.github.com/repos/TypeStrong/ts-node/labels/bug","name":"bug","color":"fc2929","default":true},{"id":280271351,"url":"https://api.github.com/repos/TypeStrong/ts-node/labels/research","name":"research","color":"eb6420","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2017-07-14T19:57:19Z","updated_at":"2018-03-17T18:37:58Z","closed_at":"2018-03-17T18:37:58Z","author_association":"NONE","body":"I have an app with `ts-node` and `ts-babel-node` configured (using the register require). When I try to start the app, I get the following error (app specific):\r\n\r\n```\r\nUncaught exception:  TSError: ⨯ Unable to compile TypeScript\r\n.../verification/spec.ts (21,28): Parameter 'state' implicitly has an 'any' type. (7006)\r\n.../verification/spec.ts (28,28): Parameter 'state' implicitly has an 'any' type. (7006)\r\n    at getOutput (.../node_modules/ts-node/dist/index.js:169:23)\r\n    at Object.compile (.../node_modules/ts-node/dist/index.js:272:19)\r\n    at Module.m._compile (.../node_modules/ts-node/dist/index.js:212:49)\r\n    at Module._extensions..js (module.js:579:10)\r\n    at Object.hook (.../node_modules/ts-babel-node/index.js:52:3)\r\n    at Module.load (module.js:487:32)\r\n    at tryModuleLoad (module.js:446:12)\r\n    at Function.Module._load (module.js:438:3)\r\n    at require (internal/module.js:20:19)\r\n    at Object.<anonymous> (.../verification/index.ts:9:13)\r\n```\r\n\r\nBut when I run `tsc`, it gives no errors. Also, in VSCode, I see no error when viewing that file.\r\n\r\nI managed to see why this was happening and this block caught my attention (https://github.com/TypeStrong/ts-node/blob/6748fa3780238e60c4c30e14d430d92b5bdc9f10/src/index.ts#L208): \r\n```ts\r\n// Add all files into the file hash.\r\nfor (const fileName of config.fileNames) {\r\n  if (/\\.d\\.ts$/.test(fileName)) {\r\n    cache.versions[fileName] = 1\r\n  }\r\n}\r\n```\r\n\r\nIf I remove the condition to only add the .d.ts files into the cache, and run the app, I see no errors. I think this condition is not right, as all the files should go to the cache since they are later used for `getScriptFileNames` in the service host (https://github.com/TypeStrong/ts-node/blob/6748fa3780238e60c4c30e14d430d92b5bdc9f10/src/index.ts#L270).\r\n\r\nI'll try to find a minimal example to repro this since I still don't understand why is this the case, but just filing this issue with a pointer to that suspicious piece in case you maybe know more about it.\r\n"}}
{"actor":{"display_login":"blakeembrey"}}