-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Description
Short description of the problem:
I have an app running at 2.0.0-beta.11 version and now I am migrating to 2.0.0-rc.0.
I 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).
I 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.
I 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'.
Thank you for the great work, you are amazing.
What behavior are you expecting?
Be able to import a npm module installed at node_modules.
Steps to reproduce:
- Start a brand new ionic 2 rc app
- Install any npm module
- Try to import it
Which Ionic Version? 2.x
Run ionic info from terminal/cmd prompt: (paste output below)
Cordova CLI: Not installed
Gulp version: CLI version 1.2.2
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X Yosemite
Node Version: v5.2.0
Xcode version: Xcode 7.2 Build version 7C68