{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic/issues/8274","repository_url":"https://api.github.com/repos/driftyco/ionic","labels_url":"https://api.github.com/repos/driftyco/ionic/issues/8274/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic/issues/8274/comments","events_url":"https://api.github.com/repos/driftyco/ionic/issues/8274/events","html_url":"https://github.com/driftyco/ionic/issues/8274","id":179914371,"number":8274,"title":"How to import/require a npm module","user":{"login":"glaucocustodio","id":1907408,"avatar_url":"https://avatars.githubusercontent.com/u/1907408?v=3","gravatar_id":"","url":"https://api.github.com/users/glaucocustodio","html_url":"https://github.com/glaucocustodio","followers_url":"https://api.github.com/users/glaucocustodio/followers","following_url":"https://api.github.com/users/glaucocustodio/following{/other_user}","gists_url":"https://api.github.com/users/glaucocustodio/gists{/gist_id}","starred_url":"https://api.github.com/users/glaucocustodio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glaucocustodio/subscriptions","organizations_url":"https://api.github.com/users/glaucocustodio/orgs","repos_url":"https://api.github.com/users/glaucocustodio/repos","events_url":"https://api.github.com/users/glaucocustodio/events{/privacy}","received_events_url":"https://api.github.com/users/glaucocustodio/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-09-28T23:11:34Z","updated_at":"2016-10-01T20:20:53Z","closed_at":"2016-09-30T17:28:42Z","body":"#### Short description of the problem:\r\nI have an app running at `2.0.0-beta.11` version and now I am migrating to `2.0.0-rc.0`.\r\n\r\nI am importing my installed modules like `PouchDB` (that was installed via `npm installl pouchdb`) through `let PouchDB = require('pouchdb');` however the same code does not work on the rc version, I just get `require is not defined` (I already have `typings` installed).\r\n\r\nI know a lot of changes were made from a version to another (Angular 2.0 final, TypeScript 2) etc and I would like to know how I should proceed now.\r\n\r\nI read that on TS 2 I should import using the new ES syntax like `import * as PouchDB from 'pouchdb'` but this way (and alternatives) I just get `Cannot find module 'pouchdb'`.\r\n\r\nThank you for the great work, you are amazing.\r\n\r\n#### What behavior are you expecting?\r\nBe able to import a npm module installed at `node_modules`.\r\n\r\n**Steps to reproduce:**\r\n1. Start a brand new ionic 2 rc app\r\n2. Install any npm module\r\n3. Try to import it \r\n\r\n**Which Ionic Version?** 2.x\r\n\r\n**Run `ionic info` from terminal/cmd prompt:** (paste output below)\r\n\r\nCordova CLI: Not installed\r\nGulp version:  CLI version 1.2.2\r\nGulp local:\r\nIonic Framework Version: 2.0.0-rc.0\r\nIonic CLI Version: 2.1.0\r\nIonic App Lib Version: 2.1.0-beta.1\r\nios-deploy version: Not installed\r\nios-sim version: Not installed\r\nOS: Mac OS X Yosemite\r\nNode Version: v5.2.0\r\nXcode version: Xcode 7.2 Build version 7C68\r\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic/issues/comments/250935253","html_url":"https://github.com/driftyco/ionic/issues/8274#issuecomment-250935253","issue_url":"https://api.github.com/repos/driftyco/ionic/issues/8274","id":250935253,"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-01T20:20:53Z","updated_at":"2016-10-01T20:20:53Z","body":"@alexbainbridge, what library are you having trouble with?\r\n\r\nThanks,\r\nDan"}}
{"actor":{"display_login":"danbucholtz"}}