studiointeract / tracker-component

Easy reactive React Components with Meteor and Tracker
MIT License
37 stars 4 forks source link

Tracker is undefined if installing via npm and tracker not meteor added #6

Closed saimeunt closed 8 years ago

saimeunt commented 8 years ago

To reproduce, meteor create a new project with 1.3, npm install this package and meteor remove tracker. tracker is explicitly api.implied using the atmosphere package but there's no such thing using the npm version. quickfix is to add back tracker as a top level dependency, maybe just clarifying this in the README is enough?

timbrandin commented 8 years ago

Is there an npm version now? I heard they are working on one, until then we need the meteor package tracker as this is a Tracker package. There's a thread on moving Tracker to npm over here: https://forums.meteor.com/t/request-publish-tracker-on-npm/20571

saimeunt commented 8 years ago

Oh, I meant installing tracker-component via npm, not tracker itself. Publishing tracker on npm would indeed solve this problem because your npm package could depend on it :)

timbrandin commented 8 years ago

Exactly, and I don't think it's far off, noting that @tmeasday wrote:

I think it makes sense for Tracker to be the first package we get onto npm. Working on it.

timbrandin commented 8 years ago

I've started working on Tracker here, just to get somewhere faster than MDG can: http://github.com/studiointeract/tracker

firrae commented 8 years ago

So then does the NPM version of tracker-component rely on your NPM version of Tracker?

jshimko commented 8 years ago

Not sure if this is related, but updating from 1.1.16 to 1.1.17 gives me this...

ReferenceError: Tracker is not defined
    at Object.<anonymous> (/Users/Jeremy/.meteor/packages/std_accounts-ui/.1.1.17.3u3am0++os+web.browser+web.cordova/npm/node_modules/tracker-component/dist/index.js:49:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/Jeremy/.meteor/packages/std_accounts-ui/.1.1.17.3u3am0++os+web.browser+web.cordova/npm/node_modules/tracker-component/index.js:1:18)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
=> Exited with code: 8

Reverting back to any earlier version fixes it immediately.

firrae commented 8 years ago

@jshimko that is the EXACT error I'm seeing.

timbrandin commented 8 years ago

Yeah, we really need tracker on NPM now @zol

timbrandin commented 8 years ago

I'll be working on this later today, adding back the check for Package['tracker'], even though I don't experience this myself.

timbrandin commented 8 years ago

The latest version has a check for this, if you could try that out, it'd be awesome. I've just checked it with std:accounts-ui.

But if you encounter any issues, I know meteor has an issue with updating the isopacks dependencies, so if your still experiencing issues, just remove the package with the broken dependency in this folder: .meteor/local/isopacks.

Hope all goes well! 💃

timbrandin commented 8 years ago

Closing due to no activity in +1 month here.