{"action":"created","issue":{"url":"https://api.github.com/repos/blakeembrey/popsicle/issues/57","repository_url":"https://api.github.com/repos/blakeembrey/popsicle","labels_url":"https://api.github.com/repos/blakeembrey/popsicle/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/blakeembrey/popsicle/issues/57/comments","events_url":"https://api.github.com/repos/blakeembrey/popsicle/issues/57/events","html_url":"https://github.com/blakeembrey/popsicle/issues/57","id":163076247,"number":57,"title":"error TS2307: Cannot find module 'url'.","user":{"login":"yongpingchen","id":1248696,"avatar_url":"https://avatars.githubusercontent.com/u/1248696?v=3","gravatar_id":"","url":"https://api.github.com/users/yongpingchen","html_url":"https://github.com/yongpingchen","followers_url":"https://api.github.com/users/yongpingchen/followers","following_url":"https://api.github.com/users/yongpingchen/following{/other_user}","gists_url":"https://api.github.com/users/yongpingchen/gists{/gist_id}","starred_url":"https://api.github.com/users/yongpingchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yongpingchen/subscriptions","organizations_url":"https://api.github.com/users/yongpingchen/orgs","repos_url":"https://api.github.com/users/yongpingchen/repos","events_url":"https://api.github.com/users/yongpingchen/events{/privacy}","received_events_url":"https://api.github.com/users/yongpingchen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-06-30T03:59:31Z","updated_at":"2016-07-01T15:31:06Z","closed_at":"2016-06-30T04:12:45Z","body":"I am using popsicle in my typescript project. And following the steps in README: \r\n\r\n- install by npm\r\n```\r\n$ npm install popsicle \r\n```\r\n- install declaration file by typings\r\n```\r\n$ typings install npm:popsicle\r\n```\r\n- reference to my ts file( `src/MyRequest.ts`)\r\n\r\n```ts\r\n/// <reference path=\"../typings/modules/popsicle/index.d.ts\" />\r\nimport {request as Popsicle} from 'popsicle'\r\n```\r\n\r\n- compile error\r\n```\r\n$ tsc src/MyRequest.ts\r\n```\r\n  with the following error:\r\n```\r\ntypings/modules/popsicle/index.d.ts(82,21): error TS2307: Cannot find module 'url'.\r\n```\r\nAnd problem part of `index.d.ts` code like this:\r\n\r\n```ts\r\n...\r\n// Source: node_modules/popsicle/dist/base.d.ts\r\ndeclare module '~popsicle/dist/base' {\r\nimport { Url } from 'url';                                               // problem here\r\nexport interface Query {\r\n    [key: string]: string | string[];\r\n}\r\nexport interface Headers {\r\n    [name: string]: string | string[];\r\n}\r\nexport type RawHeaders = string[];\r\nexport interface BaseOptions {\r\n    url?: string;\r\n    query?: string | Query;\r\n    headers?: Headers;\r\n    rawHeaders?: RawHeaders;\r\n}\r\nexport default class Base {\r\n    Url: Url;\r\n    rawHeaders: RawHeaders;\r\n    constructor({url, headers, rawHeaders, query}: BaseOptions);\r\n    url: string;\r\n    query: string | Query;\r\n    headers: Headers;\r\n...\r\n```\r\n\r\ntsc version: **Version 1.8.10**\r\ntypings version: **1.3.1**"},"comment":{"url":"https://api.github.com/repos/blakeembrey/popsicle/issues/comments/229977145","html_url":"https://github.com/blakeembrey/popsicle/issues/57#issuecomment-229977145","issue_url":"https://api.github.com/repos/blakeembrey/popsicle/issues/57","id":229977145,"user":{"login":"blakeembrey","id":1088987,"avatar_url":"https://avatars.githubusercontent.com/u/1088987?v=3","gravatar_id":"","url":"https://api.github.com/users/blakeembrey","html_url":"https://github.com/blakeembrey","followers_url":"https://api.github.com/users/blakeembrey/followers","following_url":"https://api.github.com/users/blakeembrey/following{/other_user}","gists_url":"https://api.github.com/users/blakeembrey/gists{/gist_id}","starred_url":"https://api.github.com/users/blakeembrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blakeembrey/subscriptions","organizations_url":"https://api.github.com/users/blakeembrey/orgs","repos_url":"https://api.github.com/users/blakeembrey/repos","events_url":"https://api.github.com/users/blakeembrey/events{/privacy}","received_events_url":"https://api.github.com/users/blakeembrey/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T15:31:05Z","updated_at":"2016-07-01T15:31:05Z","body":"It should work. I'm guessing you haven't included the file in the TypeScript project. Can you share how you're running compilation?"}}
{"actor":{"display_login":"blakeembrey"}}