{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/163","repository_url":"https://api.github.com/repos/driftyco/ionic-app-scripts","labels_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/163/comments","events_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/163/events","html_url":"https://github.com/driftyco/ionic-app-scripts/issues/163","id":183074177,"number":163,"title":"Dev build/ionic serve fail when using globally-defined types.","user":{"login":"JustinPierce","id":447286,"avatar_url":"https://avatars.githubusercontent.com/u/447286?v=3","gravatar_id":"","url":"https://api.github.com/users/JustinPierce","html_url":"https://github.com/JustinPierce","followers_url":"https://api.github.com/users/JustinPierce/followers","following_url":"https://api.github.com/users/JustinPierce/following{/other_user}","gists_url":"https://api.github.com/users/JustinPierce/gists{/gist_id}","starred_url":"https://api.github.com/users/JustinPierce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JustinPierce/subscriptions","organizations_url":"https://api.github.com/users/JustinPierce/orgs","repos_url":"https://api.github.com/users/JustinPierce/repos","events_url":"https://api.github.com/users/JustinPierce/events{/privacy}","received_events_url":"https://api.github.com/users/JustinPierce/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"danbucholtz","id":4680488,"avatar_url":"https://avatars.githubusercontent.com/u/4680488?v=3","gravatar_id":"","url":"https://api.github.com/users/danbucholtz","html_url":"https://github.com/danbucholtz","followers_url":"https://api.github.com/users/danbucholtz/followers","following_url":"https://api.github.com/users/danbucholtz/following{/other_user}","gists_url":"https://api.github.com/users/danbucholtz/gists{/gist_id}","starred_url":"https://api.github.com/users/danbucholtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbucholtz/subscriptions","organizations_url":"https://api.github.com/users/danbucholtz/orgs","repos_url":"https://api.github.com/users/danbucholtz/repos","events_url":"https://api.github.com/users/danbucholtz/events{/privacy}","received_events_url":"https://api.github.com/users/danbucholtz/received_events","type":"User","site_admin":false},"assignees":[{"login":"danbucholtz","id":4680488,"avatar_url":"https://avatars.githubusercontent.com/u/4680488?v=3","gravatar_id":"","url":"https://api.github.com/users/danbucholtz","html_url":"https://github.com/danbucholtz","followers_url":"https://api.github.com/users/danbucholtz/followers","following_url":"https://api.github.com/users/danbucholtz/following{/other_user}","gists_url":"https://api.github.com/users/danbucholtz/gists{/gist_id}","starred_url":"https://api.github.com/users/danbucholtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbucholtz/subscriptions","organizations_url":"https://api.github.com/users/danbucholtz/orgs","repos_url":"https://api.github.com/users/danbucholtz/repos","events_url":"https://api.github.com/users/danbucholtz/events{/privacy}","received_events_url":"https://api.github.com/users/danbucholtz/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-10-14T15:05:19Z","updated_at":"2016-10-14T15:56:42Z","closed_at":"2016-10-14T15:56:42Z","body":"**Note: for support questions, please use one of these channels:**\r\n\r\nhttps://forum.ionicframework.com/\r\nhttp://ionicworldwide.herokuapp.com/\r\n\r\n\r\n#### Short description of the problem:\r\nUsing the `ionic-app-scripts@0.0.33` (or any version greater than `0.0.30`), building with `--dev` (and, by extension, `ionic serve`) will fail if you reference types that are defined globally. Specific examples that I've seen are `@types/jasmine` and `@types/googlemaps`. Neither of these packages declares a `module` that can be imported with an `import` statement.\r\n\r\nA production build completes successfully, and a dev build completes successfully on `ionic-app-scripts@0.0.30`.\r\n\r\n#### What behavior are you expecting?\r\nI expect the build to complete successfully. 😉\r\n\r\n**Steps to reproduce:**\r\n\r\n1. Create a test project (`ionic start test --v2`)\r\n2. Update dependencies to use `ionic-app-scripts@0.0.33`, if the starter still does not reference it.\r\n3. Optional sanity build (`npm run build --dev`). This build should be successful.\r\n4. Install a type definition that defines everything globally (`npm install --save @types/googlemaps`).\r\n5. Reference one of those types. I added `public thingy: google.maps.places.PlaceResult = null;` to `src/pages/home/home.ts`.\r\n6. Attempt a dev build. This build should fail with something similar to the following:\r\n\r\n```\r\n> ionic-hello-world@ build C:\\Source\\GitHub\\test\r\n> ionic-app-scripts build\r\n\r\n[09:47:19]  ionic-app-scripts 0.0.33\r\n[09:47:19]  build dev started ...\r\n[09:47:19]  clean started ...\r\n[09:47:19]  clean finished in 9 ms\r\n[09:47:19]  copy started ...\r\n[09:47:19]  transpile started ...\r\n[09:47:19]  lint started ...\r\n[09:47:21]  lint finished in 1.90 s\r\n[09:47:22]  typescript: C:/Source/GitHub/test/src/pages/home/home.ts, line: 10\r\n            Cannot find namespace 'google'.\r\n\r\n       L9:  export class HomePage {\r\n      L10:    public thingy: google.maps.places.PlaceResult = null;\r\n\r\n[09:47:22]  transpile failed\r\n[09:47:22]  ionic-app-script task: \"build\"\r\n[09:47:22]  Error: Error\r\n```\r\n\r\n**Which @ionic/app-scripts version are you using?**\r\n\r\n`0.0.33`\r\n\r\n**Other information:** (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)\r\n\r\nI'm developing on Windows. I haven't tried this on another OS, but I know there have been some Windows-specific issues with the last few versions of `ionic-app-scripts`."},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/comments/253842435","html_url":"https://github.com/driftyco/ionic-app-scripts/issues/163#issuecomment-253842435","issue_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/163","id":253842435,"user":{"login":"danbucholtz","id":4680488,"avatar_url":"https://avatars.githubusercontent.com/u/4680488?v=3","gravatar_id":"","url":"https://api.github.com/users/danbucholtz","html_url":"https://github.com/danbucholtz","followers_url":"https://api.github.com/users/danbucholtz/followers","following_url":"https://api.github.com/users/danbucholtz/following{/other_user}","gists_url":"https://api.github.com/users/danbucholtz/gists{/gist_id}","starred_url":"https://api.github.com/users/danbucholtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbucholtz/subscriptions","organizations_url":"https://api.github.com/users/danbucholtz/orgs","repos_url":"https://api.github.com/users/danbucholtz/repos","events_url":"https://api.github.com/users/danbucholtz/events{/privacy}","received_events_url":"https://api.github.com/users/danbucholtz/received_events","type":"User","site_admin":false},"created_at":"2016-10-14T15:56:42Z","updated_at":"2016-10-14T15:56:42Z","body":"So, this isn't an actual bug, then. This is the desired behavior.\r\n\r\nGoing to close this issue for now. Perhaps we should document this better. This is a general Typescript thing, though.\r\n\r\nThanks,\r\nDan"}}
{"actor":{"display_login":"danbucholtz"}}