Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixpanel people() functions not exposed #677

Closed
steveharbick opened this issue Oct 11, 2016 · 3 comments
Closed

Mixpanel people() functions not exposed #677

steveharbick opened this issue Oct 11, 2016 · 3 comments

Comments

@steveharbick
Copy link

The MixpanelPeople functions (Cordova plugin window.mixpanel.people) are not available. I've attempted to set the people properties by using MixpanelPeople.set() and by Mixpanel.people.set(), but neither works.

When attempting MixpanelPeople.set(), I get following build error:
[18:46:12] Error: Module /Users/steveharbick/dev/src/ServConnect/node_modules/ionic-native/dist/esm/index.js does not export MixpanelPeople (imported by /Users/steveharbick/dev/src/ServConnect/.tmp/providers/mixpanel.js) at Module.trace (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:7677:29) at ModuleScope.findDeclaration (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:7300:22) at Scope.findDeclaration (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:5351:39) at Scope.findDeclaration (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:5351:39) at Scope.findDeclaration (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:5351:39) at MemberExpression.bind (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:6666:28) at /Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:5151:50 at CallExpression.eachChild (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:5168:5) at CallExpression.bind (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:5151:7) at CallExpression.bind (/Users/steveharbick/dev/src/ServConnect/node_modules/rollup/dist/rollup.js:5842:23)

When attempting to use Mixpanel.people.set(), I get following build error:
[18:57:16] ngc error: Error: Error at /Users/steveharbick/dev/src/ServConnect/.tmp/providers/mixpanel.ts:27:25: Property 'set' does not exist on type 'MixpanelPeople'. at check (/Users/steveharbick/dev/src/ServConnect/node_modules/@angular/tsc-wrapped/src/tsc.js:31:15) at Tsc.typeCheck (/Users/steveharbick/dev/src/ServConnect/node_modules/@angular/tsc-wrapped/src/tsc.js:86:9) at /Users/steveharbick/dev/src/ServConnect/node_modules/@angular/tsc-wrapped/src/main.js:33:23 at process._tickCallback (internal/process/next_tick.js:103:7) at Module.runMain (module.js:592:11) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3

The mixpanel.d.ts appears to reflect readonly on people():
`
/**
*
* @returns {MixpanelPeople}
*/

static readonly people: MixpanelPeople;

`

Is that right? I think either the MixpanelPeople class should be exposed or the Mixpanel.people should be working functions.

@ihadeed
Copy link
Collaborator

ihadeed commented Oct 11, 2016

Can you try something like this:

let people = Mixpanel.people;

people.set(...); 

@steveharbick
Copy link
Author

steveharbick commented Oct 13, 2016

Tried:
let people = Mixpanel.people; people.set({"$email":"...", "org":".."});

But fails both in editor and on build:

[12:20:42] ngc error: Error: Error at /Users/steveharbick/dev/src/ServConnect/.tmp/providers/mixpanel.ts:26:16: Property 'set' does not exist on type 'MixpanelPeople'. at check (/Users/steveharbick/dev/src/ServConnect/node_modules/@angular/tsc-wrapped/src/tsc.js:31:15) at Tsc.typeCheck (/Users/steveharbick/dev/src/ServConnect/node_modules/@angular/tsc-wrapped/src/tsc.js:86:9) at /Users/steveharbick/dev/src/ServConnect/node_modules/@angular/tsc-wrapped/src/main.js:33:23 at process._tickCallback (internal/process/next_tick.js:103:7) at Module.runMain (module.js:592:11) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3

@lincolnthree
Copy link
Contributor

Is this incorporated in Ionic 2 RC3? I just started experiencing this issue after upgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants