okland / accounts-phone

A login service based on mobile phone number for Meteor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compatibility with Meteor 1.3

oskarszoon opened this issue · comments

Hi

I wanted to test out the upcoming Meteor 1.3 (currently at rc2) but ran into a very weird issue where just this package was throwing an error during the build process

W20160316-11:44:36.113(1)? (STDERR) /Users/xxx/.meteor/packages/meteor-tool/.1.2.4-rc.2.120nk3i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:267
W20160316-11:44:36.113(1)? (STDERR)                         throw(ex);
W20160316-11:44:36.113(1)? (STDERR)                               ^
W20160316-11:44:36.184(1)? (STDERR) TypeError: Cannot read property 'meteor' of undefined
W20160316-11:44:36.185(1)? (STDERR)     at /Users/xxx/app/.meteor/local/build/programs/server/packages/okland_accounts-phone.js:4:21
W20160316-11:44:36.185(1)? (STDERR)     at /Users/xxx/app/.meteor/local/build/programs/server/packages/okland_accounts-phone.js:872:3
W20160316-11:44:36.185(1)? (STDERR)     at /Users/xxx/app/.meteor/local/build/programs/server/boot.js:281:10
W20160316-11:44:36.185(1)? (STDERR)     at Array.forEach (native)
W20160316-11:44:36.185(1)? (STDERR)     at Function._.each._.forEach (/Users/xxx/.meteor/packages/meteor-tool/.1.2.4-rc.2.120nk3i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
W20160316-11:44:36.185(1)? (STDERR)     at /Users/xxx/app/.meteor/local/build/programs/server/boot.js:133:5
W20160316-11:44:38.977(1)? (STDERR)           
W20160316-11:44:38.978(1)? (STDERR) /Users/xxx/.meteor/packages/meteor-tool/.1.2.4-rc.2.120nk3i++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:267

The beginning of the source of the built okland_accounts-phone.js file looks like this:

(function () {

/* Imports */
var Meteor = Package.meteor.Meteor;
var global = Package.meteor.global;
var meteorEnv = Package.meteor.meteorEnv;
...

So it seems it doesn't have Package available in the global scope at this stage, which is weird because all the other packages have the same header in their built files. So it might be a loading order issue or something.

Removing just this package fixes my app after which it runs fine in 1.3

Anybody have any ideas?

Having same issue any ideas or help

Having same issue

I was having the same error. Running on the theory that it was a loading order issue (possibly due to similarity to accounts packages) I changed the name in package.js to zaccounts-phone and loaded my app successfully.

same issue here

I removed dist folder, removed and added the plugin and it worked