{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/88","repository_url":"https://api.github.com/repos/driftyco/ionic-app-scripts","labels_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/88/comments","events_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/88/events","html_url":"https://github.com/driftyco/ionic-app-scripts/issues/88","id":180923197,"number":88,"title":"Parse JS SDK doesn't work after rollup","user":{"login":"jgw96","id":8823093,"avatar_url":"https://avatars.githubusercontent.com/u/8823093?v=3","gravatar_id":"","url":"https://api.github.com/users/jgw96","html_url":"https://github.com/jgw96","followers_url":"https://api.github.com/users/jgw96/followers","following_url":"https://api.github.com/users/jgw96/following{/other_user}","gists_url":"https://api.github.com/users/jgw96/gists{/gist_id}","starred_url":"https://api.github.com/users/jgw96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgw96/subscriptions","organizations_url":"https://api.github.com/users/jgw96/orgs","repos_url":"https://api.github.com/users/jgw96/repos","events_url":"https://api.github.com/users/jgw96/events{/privacy}","received_events_url":"https://api.github.com/users/jgw96/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/labels/v2","name":"v2","color":"ededed"}],"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-04T15:18:12Z","updated_at":"2016-10-06T02:33:57Z","closed_at":"2016-10-05T19:46:48Z","body":"_From @alamusi on September 30, 2016 4:33_\n\n#### Short description of the problem:\r\nParse JS SDK no longer works with RC0\r\n\r\n#### What behavior are you expecting?\r\nLike beta11 and many other beta version, it should work regardless in browsify, webpack, or this new rollup...\r\n\r\n**Steps to reproduce:**\r\n1. ionic start test blank --v2\r\n2. npm install --save parse\r\n3. npm install --save events\r\n4. add **preferBuiltins: false** into rollup.config -> plugins -> nodeResolve (to satisfy events dependency)\r\n5. ionic serve\r\n\r\n```\r\nimport { Component } from '@angular/core';\r\nimport { Platform } from 'ionic-angular';\r\nimport { StatusBar } from 'ionic-native';\r\n\r\nimport { HomePage } from '../pages/home/home';\r\n\r\nimport Parse from 'parse';\r\n\r\n@Component({\r\n  template: `<ion-nav [root]=\"rootPage\"></ion-nav>`\r\n})\r\nexport class MyApp {\r\n  rootPage = HomePage;\r\n\r\n  constructor(platform: Platform) {\r\n    console.log('Parse initialize started...',Parse);\r\n    Parse.initialize('MY_APP_DEV');\r\n    Parse.serverURL = 'http://localhost:5000/v1';\r\n    console.log('Parse initialize completed...',Parse);\r\n    console.log('Parse config local success ',Parse.Config.current());\r\n    Parse.Config.get().then(config => {\r\n      console.log('Parse config read success ',config);\r\n    },err=>{\r\n      console.error('Parse config read failed ',err);\r\n    });\r\n    let query = new Parse.Query(Parse.User);\r\n    query.find().then(result=>{\r\n      result.forEach(user=>{\r\n        console.log('user ',user);\r\n      });\r\n    });\r\n\r\n    platform.ready().then(() => {\r\n      // Okay, so the platform is ready and our plugins are available.\r\n      // Here you can do any higher level native things you might need.\r\n      StatusBar.styleDefault();\r\n    });\r\n  }\r\n}\r\n```\r\n\r\n**Other information:** (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)\r\nchrome console indicates Parse initialization is successful. a config call to backend is successful. then it goes wrong when trying to create a new query object. \r\nAfter stack tracing all the way back to the exception, the issue was pointing to line 35~37 of /Parse/lib/browser/ParseQuery.js. var _ParseObject got undefined, which really shouldn't...\r\n```\r\nvar _ParseObject = require('./ParseObject');\r\n\r\nvar _ParseObject2 = _interopRequireDefault(_ParseObject);\r\n```\r\nThis also happened for other class/object, such as Parse.User.logIn() call. Some other var ??? = require('./Parse???'); still got \"undefined\".\r\n\r\n>  Parse initialize started... Object {Analytics: Object, Cloud: Object, CoreManager: Object, FacebookUtils: Object, Op: Object…}\r\n> app.component.js:23 Parse initialize completed... Object {Analytics: Object, Cloud: Object, CoreManager: Object, FacebookUtils: Object, Op: Object…}\r\n> app.component.js:29 Parse config local success  ParseConfig {attributes: Object, _escapedAttributes: Object}\r\n> error_handler.js:45 EXCEPTION: Error in ./MyApp class MyApp_Host - inline template:0:0 caused by: Right-hand side of 'instanceof' is not an objectErrorHandler.handleError @ error_handler.js:45(anonymous function) @ application_ref.js:210t.invoke @ polyfills.js:3onInvoke @ ng_zone_impl.js:43t.invoke @ polyfills.js:3e.run @ polyfills.js:3(anonymous function) @ polyfills.js:3t.invokeTask @ polyfills.js:3onInvokeTask @ ng_zone_impl.js:34t.invokeTask @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:47 ORIGINAL EXCEPTION: Right-hand side of 'instanceof' is not an objectErrorHandler.handleError @ error_handler.js:47(anonymous function) @ application_ref.js:210t.invoke @ polyfills.js:3onInvoke @ ng_zone_impl.js:43t.invoke @ polyfills.js:3e.run @ polyfills.js:3(anonymous function) @ polyfills.js:3t.invokeTask @ polyfills.js:3onInvokeTask @ ng_zone_impl.js:34t.invokeTask @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:50 ORIGINAL STACKTRACE:ErrorHandler.handleError @ error_handler.js:50(anonymous function) @ application_ref.js:210t.invoke @ polyfills.js:3onInvoke @ ng_zone_impl.js:43t.invoke @ polyfills.js:3e.run @ polyfills.js:3(anonymous function) @ polyfills.js:3t.invokeTask @ polyfills.js:3onInvokeTask @ ng_zone_impl.js:34t.invokeTask @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:51 TypeError: Right-hand side of 'instanceof' is not an object\r\n>     at new ParseQuery (ParseQuery.js:134)\r\n>     at new MyApp (app.component.js:35)\r\n>     at DebugAppView._View_MyApp_Host0.createInternal (MyApp_Host.ngfactory.js:16)\r\n>     at DebugAppView.AppView.create (view.js:125)\r\n>     at DebugAppView.create (view.js:337)\r\n>     at ComponentFactory.create (component_factory.js:153)\r\n>     at ViewContainerRef_.createComponent (view_container_ref.js:114)\r\n>     at IonicApp.ngOnInit (app-root.js:25)\r\n>     at DebugAppView._View_IonicApp_Host0.detectChangesInternal (IonicApp_Host.ngfactory.js:29)\r\n>     at DebugAppView.AppView.detectChanges (view.js:272)ErrorHandler.handleError @ error_handler.js:51(anonymous function) @ application_ref.js:210t.invoke @ polyfills.js:3onInvoke @ ng_zone_impl.js:43t.invoke @ polyfills.js:3e.run @ polyfills.js:3(anonymous function) @ polyfills.js:3t.invokeTask @ polyfills.js:3onInvokeTask @ ng_zone_impl.js:34t.invokeTask @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:54 ERROR CONTEXT:ErrorHandler.handleError @ error_handler.js:54(anonymous function) @ application_ref.js:210t.invoke @ polyfills.js:3onInvoke @ ng_zone_impl.js:43t.invoke @ polyfills.js:3e.run @ polyfills.js:3(anonymous function) @ polyfills.js:3t.invokeTask @ polyfills.js:3onInvokeTask @ ng_zone_impl.js:34t.invokeTask @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:55 DebugContext {_view: _View_MyApp_Host0, _nodeIndex: 0, _tplRow: 0, _tplCol: 0}ErrorHandler.handleError @ error_handler.js:55(anonymous function) @ application_ref.js:210t.invoke @ polyfills.js:3onInvoke @ ng_zone_impl.js:43t.invoke @ polyfills.js:3e.run @ polyfills.js:3(anonymous function) @ polyfills.js:3t.invokeTask @ polyfills.js:3onInvokeTask @ ng_zone_impl.js:34t.invokeTask @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> app.component.js:20 Parse initialize started... Object {Analytics: Object, Cloud: Object, CoreManager: Object, FacebookUtils: Object, Op: Object…}\r\n> app.component.js:23 Parse initialize completed... Object {Analytics: Object, Cloud: Object, CoreManager: Object, FacebookUtils: Object, Op: Object…}\r\n> app.component.js:29 Parse config local success  ParseConfig {attributes: Object, _escapedAttributes: Object}\r\n> error_handler.js:45 EXCEPTION: Error in ./MyApp class MyApp_Host - inline template:0:0 caused by: Right-hand side of 'instanceof' is not an objectErrorHandler.handleError @ error_handler.js:45next @ application_ref.js:272EventEmitter.subscribe.schedulerFn @ async.js:82SafeSubscriber.__tryOrUnsub @ Subscriber.js:223SafeSubscriber.next @ Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @ Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @ async.js:74onError @ ng_zone.js:120onHandleError @ ng_zone_impl.js:64t.handleError @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:47 ORIGINAL EXCEPTION: Right-hand side of 'instanceof' is not an objectErrorHandler.handleError @ error_handler.js:47next @ application_ref.js:272EventEmitter.subscribe.schedulerFn @ async.js:82SafeSubscriber.__tryOrUnsub @ Subscriber.js:223SafeSubscriber.next @ Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @ Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @ async.js:74onError @ ng_zone.js:120onHandleError @ ng_zone_impl.js:64t.handleError @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:50 ORIGINAL STACKTRACE:ErrorHandler.handleError @ error_handler.js:50next @ application_ref.js:272EventEmitter.subscribe.schedulerFn @ async.js:82SafeSubscriber.__tryOrUnsub @ Subscriber.js:223SafeSubscriber.next @ Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @ Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @ async.js:74onError @ ng_zone.js:120onHandleError @ ng_zone_impl.js:64t.handleError @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:51 TypeError: Right-hand side of 'instanceof' is not an object\r\n>     at new ParseQuery (ParseQuery.js:134)\r\n>     at new MyApp (app.component.js:35)\r\n>     at DebugAppView._View_MyApp_Host0.createInternal (MyApp_Host.ngfactory.js:16)\r\n>     at DebugAppView.AppView.create (view.js:125)\r\n>     at DebugAppView.create (view.js:337)\r\n>     at ComponentFactory.create (component_factory.js:153)\r\n>     at ViewContainerRef_.createComponent (view_container_ref.js:114)\r\n>     at IonicApp.ngOnInit (app-root.js:25)\r\n>     at DebugAppView._View_IonicApp_Host0.detectChangesInternal (IonicApp_Host.ngfactory.js:29)\r\n>     at DebugAppView.AppView.detectChanges (view.js:272)ErrorHandler.handleError @ error_handler.js:51next @ application_ref.js:272EventEmitter.subscribe.schedulerFn @ async.js:82SafeSubscriber.__tryOrUnsub @ Subscriber.js:223SafeSubscriber.next @ Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @ Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @ async.js:74onError @ ng_zone.js:120onHandleError @ ng_zone_impl.js:64t.handleError @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:54 ERROR CONTEXT:ErrorHandler.handleError @ error_handler.js:54next @ application_ref.js:272EventEmitter.subscribe.schedulerFn @ async.js:82SafeSubscriber.__tryOrUnsub @ Subscriber.js:223SafeSubscriber.next @ Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @ Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @ async.js:74onError @ ng_zone.js:120onHandleError @ ng_zone_impl.js:64t.handleError @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> error_handler.js:55 DebugContext {_view: _View_MyApp_Host0, _nodeIndex: 0, _tplRow: 0, _tplCol: 0}ErrorHandler.handleError @ error_handler.js:55next @ application_ref.js:272EventEmitter.subscribe.schedulerFn @ async.js:82SafeSubscriber.__tryOrUnsub @ Subscriber.js:223SafeSubscriber.next @ Subscriber.js:172Subscriber._next @ Subscriber.js:125Subscriber.next @ Subscriber.js:89Subject.next @ Subject.js:55EventEmitter.emit @ async.js:74onError @ ng_zone.js:120onHandleError @ ng_zone_impl.js:64t.handleError @ polyfills.js:3e.runTask @ polyfills.js:3i @ polyfills.js:3\r\n> polyfills.js:3 ViewWrappedError {_nativeError: Error: Error in ./MyApp class MyApp_Host - inline template:0:0 caused by: Right-hand side of 'instan…, originalError: TypeError: Right-hand side of 'instanceof' is not an object\r\n>     at new ParseQuery (http://localhost:…, context: DebugContext}o @ polyfills.js:3i @ polyfills.js:3\r\n> polyfills.js:3 Unhandled Promise rejection: Error in ./MyApp class MyApp_Host - inline template:0:0 caused by: Right-hand side of 'instanceof' is not an object ; Zone: <root> ; Task: Promise.then ; Value: ViewWrappedError {_nativeError: Error: Error in ./MyApp class MyApp_Host - inline template:0:0 caused by: Right-hand side of 'instan…, originalError: TypeError: Right-hand side of 'instanceof' is not an object\r\n>     at new ParseQuery (http://localhost:…, context: DebugContext} TypeError: Right-hand side of 'instanceof' is not an object\r\n>     at new ParseQuery (http://localhost:8100/build/main.js:80190:28)\r\n>     at new MyApp (http://localhost:8100/build/main.js:89882:21)\r\n>     at DebugAppView._View_MyApp_Host0.createInternal (MyApp_Host.ngfactory.js:16:21)\r\n>     at DebugAppView.AppView.create (http://localhost:8100/build/main.js:10257:21)\r\n>     at DebugAppView.create (http://localhost:8100/build/main.js:10469:44)\r\n>     at ComponentFactory.create (http://localhost:8100/build/main.js:6050:36)\r\n>     at ViewContainerRef_.createComponent (http://localhost:8100/build/main.js:5361:45)\r\n>     at IonicApp.ngOnInit (http://localhost:8100/build/main.js:48112:43)\r\n>     at DebugAppView._View_IonicApp_Host0.detectChangesInternal (IonicApp_Host.ngfactory.js:29:77)\r\n>     at DebugAppView.AppView.detectChanges (http://localhost:8100/build/main.js:10404:14)o @ polyfills.js:3r @ polyfills.js:3i @ polyfills.js:3\r\n> polyfills.js:3 Error: Uncaught (in promise): Error: Error in ./MyApp class MyApp_Host - inline template:0:0 caused by: Right-hand side of 'instanceof' is not an object(…)o @ polyfills.js:3r @ polyfills.js:3i @ polyfills.js:3\r\n> app.component.js:31 Parse config read success  ParseConfig {attributes: Object, _escapedAttributes: Object}\r\n> app.component.js:31 Parse config read success  ParseConfig {attributes: Object, _escapedAttributes: Object}\r\n> \r\n\r\n**Which Ionic Version?** 1.x or 2.x\r\n2.0RC0\r\n\r\n**Run `ionic info` from terminal/cmd prompt:** (paste output below)\r\nCordova CLI: 6.3.1\r\n\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 El Capitan\r\nNode Version: v6.6.0\r\nXcode version: Xcode 7.3.1 Build version 7D1014 \r\n\r\n\r\n\n\n_Copied from original issue: driftyco/ionic#8331_"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/comments/251852641","html_url":"https://github.com/driftyco/ionic-app-scripts/issues/88#issuecomment-251852641","issue_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/88","id":251852641,"user":{"login":"cleever","id":2815335,"avatar_url":"https://avatars.githubusercontent.com/u/2815335?v=3","gravatar_id":"","url":"https://api.github.com/users/cleever","html_url":"https://github.com/cleever","followers_url":"https://api.github.com/users/cleever/followers","following_url":"https://api.github.com/users/cleever/following{/other_user}","gists_url":"https://api.github.com/users/cleever/gists{/gist_id}","starred_url":"https://api.github.com/users/cleever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleever/subscriptions","organizations_url":"https://api.github.com/users/cleever/orgs","repos_url":"https://api.github.com/users/cleever/repos","events_url":"https://api.github.com/users/cleever/events{/privacy}","received_events_url":"https://api.github.com/users/cleever/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T02:33:57Z","updated_at":"2016-10-06T02:33:57Z","body":"Thank you @danbucholtz for the help.\r\n\r\nAny ideas about \"Super expression must either be null or a function, not undefined\" exception\" on Parse imports?\r\n\r\nThe problem occurs when LiveQuerySubscription.js Parse file is read.\r\n\r\nSeems to be related:\r\nhttps://github.com/rollup/rollup/issues/594\r\n"}}
{"actor":{"display_login":"cleever"}}