Coder Social home page Coder Social logo

Comments (20)

Sivli-Embir avatar Sivli-Embir commented on May 20, 2024

@alanning Your likely going to just love this but both Handlebars and UI are depreciated. See https://github.com/meteor/meteor/blob/devel/History.md. That said I am not having this problem, not sure why its not working for you @zimme but UI should an alias to Blaze. Possibly load order?

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

@zakirarrayiq, which version of meteor are you running?

In app directory, run:

$ cat .meteor/release

from meteor-roles.

zakirarrayiq avatar zakirarrayiq commented on May 20, 2024

[email protected]

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

@zakirarrayiq, can you check which version of 'roles' is getting pulled in please?

$ meteor list

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

@zakirarrayiq, the error message you posted is from an older version of roles so it seems roles version v1.2.13 (for Meteor 0.9.1+) is not getting pulled in for some reason. Not sure why, maybe a glitch in the package hosting servers? These steps work for me:

kaia2:~/tmp$ meteor create foo6
foo6: created.

To run your new app:
   cd foo6
   meteor
kaia2:~/tmp$ cd foo6
kaia2:~/tmp/foo6$ meteor add alanning:roles
  added accounts-base at version 1.0.1
  added service-configuration at version 1.0.1
  added alanning:roles at version 1.2.13
  added localstorage at version 1.0.0

alanning:roles: Role-based authorization
kaia2:~/tmp/foo6$ meteor

@CMToups, thanks for the update. I think we're ok with the deprecation as the 0.9+ versions explicitly check for Blaze stuff first (as much as we're able... grrr).

  if (api.versionsFrom) {
    api.versionsFrom('[email protected]');
    api.use(['[email protected]'], 'client', {weak: true});
  } else if(uiExists()) {
    // This is needed due to Meteor Issue #1358
    //   https://github.com/meteor/meteor/issues/1358
    //
    // In meteor < 0.9, the 'weak' flag doesn't work with packages 
    // that aren't in meteor's internal cache (ie. non-core packages)
    api.use(['ui'], 'client', {weak: true});
  } else {
    api.use(['handlebars'], 'client', {weak: true});
  }

Source: https://github.com/alanning/meteor-roles/blob/meteor-0.9.1/roles/package.js#L13-L25

from meteor-roles.

zakirarrayiq avatar zakirarrayiq commented on May 20, 2024

@alanning You are right I am pulling old code. I am behind a proxy and it gives an error first and then defaults to another package server. Here is output

Refreshing package metadata. This may take a moment.
Error connecting to package server: DDP connection timed out
Warning: could not connect to package server
added accounts-base at version 1.0.1
added service-configuration at version 1.0.1
added alanning:roles at version 1.2.12
added localstorage at version 1.0.0

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

You can manually get it to work by pulling down the meteor-0.9.1 branch contents into your packages directory.

You may also be able to add "ui" to your .meteor/packages file before "alanning:roles" but it depends on how the Meteor 0.9.1.1 release handles old package names.

from meteor-roles.

zakirarrayiq avatar zakirarrayiq commented on May 20, 2024

Thanks for your help. I will wait couple of days to see whether package servers gets updated with your latest versions.

from meteor-roles.

pnunn avatar pnunn commented on May 20, 2024

Hi alanning, having some issues upgrading an app to 0.9 and am stuck at the moment on adding roles.

I've mrt migrate-app with out error now (after removing a bunch of pre 0.9 packages from smart.json, including roles), but then tried to do meteor add alanning:roles and I get

Refreshing package metadata. This may take a moment.
Figuring out the best package versions to use. This may take a moment.
Could not resolve the specified constraints for this project:
Error: unknown package: roles

.meteor/releases show [email protected]. meteor list shows the same error as the add command did.

Any ideas?

OK, found it, had to meteor remove cmather:iron-router, then added iron:core etc and then could load roles. Now to see what else I've broken in the process :)

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

Looks like we'll need to release another version just for Meteor 0.9.2.

I'll publish a new release today and let you know.

Not sure why the 0.9.1 version is not compatible with 0.9.2 but the good news is that this won't be a problem after 0.9.3 lands as Meteor will allow support for multiple versions of packages.

Sent from my phone

On Sep 21, 2014, at 10:47 PM, Peter Nunn [email protected] wrote:

Hi alanning, having some issues upgrading an app to 0.9 and am stuck at the moment on adding roles.

I've mrt migrate-app with out error now (after removing a bunch of pre 0.9 packages from smart.json, including roles), but then tried to do meteor add alanning:roles and I get

Refreshing package metadata. This may take a moment.
Figuring out the best package versions to use. This may take a moment.
Could not resolve the specified constraints for this project:
Error: unknown package: roles

.meteor/releases show [email protected]. meteor list shows the same error as the add command did.

Any ideas?


Reply to this email directly or view it on GitHub.

from meteor-roles.

zda avatar zda commented on May 20, 2024

Don't know if you've already published the new version yet, or if I should just hold tight, but FWIW I'm having the same issue (WARNING: Roles template helpers not registered. Handlebars or UI package not found) on Meteor 0.9.2.2.

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

@pnunn , it sounds like the issue was an older version of iron router?

@zda, could you publish a small reproduction of this issue please? I'm having a hard time seeing that Warning show up.

from meteor-roles.

zda avatar zda commented on May 20, 2024

@alanning, try this: https://github.com/zda/meteor-roles-debug

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

@zda, Thanks for the repro. Running meteor list results in:

alanning:roles         1.2.12* Role-based authorization

 * New versions of these packages are available! Run 'meteor update' to update.

Running meteor update does nothing... but removing and re-adding fixes the issue by pulling in roles version 1.2.13:

meteor remove alanning:roles
meteor add alanning:roles

from meteor-roles.

Sivli-Embir avatar Sivli-Embir commented on May 20, 2024

Just an FYI after reading this: I have noted that meteor update and meteor update alanning:roles does not seem to work. An easy trick I have found is just editing the .meteor/packages file like such alanning:roles@=1.2.13

from meteor-roles.

CaptainChainsaw avatar CaptainChainsaw commented on May 20, 2024

Looks like this is still an issue. I'm getting it on Meteor v1.2.0.1. I've tried removing and adding the package but that didn't work. I've also installed the patch to fix the "Exception in template helper: ReferenceError: Match is not defined " issue.

alanning:roles 1.2.13+ Authorization package for Meteor

Anyone else still getting this issue? Any idea how to fix this?

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

Hi @CaptainChainsaw,

I just tried creating a new Meteor 1.2.0.1 app and adding roles and it seems to work. I don't see any errors in the console when testing with latest Chrome desktop. Could you try the following steps and see if your results match mine, please?

kaia2:~$ cd tmp
kaia2:~/tmp$ meteor create foo3
Created a new Meteor app in 'foo3'.

To run your new app:
  cd foo3
  meteor

If you are new to Meteor, try some of the learning resources here:
  https://www.meteor.com/learn

kaia2:~/tmp$ cd foo3
kaia2:~/tmp/foo3$ meteor add alanning:roles

Changes to your project's package version selections:

accounts-base          added, version 1.2.1
alanning:roles         added, version 1.2.13
ddp-rate-limiter       added, version 1.0.0
localstorage           added, version 1.0.5
rate-limit             added, version 1.0.0
service-configuration  added, version 1.0.5


alanning:roles: Role-based authorization

kaia2:~/tmp/foo3$ meteor
[[[[[ ~/tmp/foo3 ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Started your app.

=> App running at: http://localhost:3000/
I20150928-13:28:54.066(-4)? ** You've set up some data subscriptions with Meteor.publish(), but
I20150928-13:28:54.067(-4)? ** you still have autopublish turned on. Because autopublish is still
I20150928-13:28:54.068(-4)? ** on, your Meteor.publish() calls won't have much effect. All data
I20150928-13:28:54.068(-4)? ** will still be sent to all clients.
I20150928-13:28:54.071(-4)? **
I20150928-13:28:54.071(-4)? ** Turn off autopublish by removing the autopublish package:
I20150928-13:28:54.071(-4)? **
I20150928-13:28:54.071(-4)? **   $ meteor remove autopublish
I20150928-13:28:54.072(-4)? **
I20150928-13:28:54.072(-4)? ** .. and make sure you have Meteor.publish() and Meteor.subscribe() calls
I20150928-13:28:54.072(-4)? ** for each collection that you want clients to see.
I20150928-13:28:54.072(-4)?
^C
kaia2:~/tmp/foo3$ meteor --version
Meteor 1.2.0.1

from meteor-roles.

CaptainChainsaw avatar CaptainChainsaw commented on May 20, 2024

Hey,

challett released a new patch that sorted this:

https://github.com/challett/meteor-roles/tree/challett-patch-4

Cheers :)

from meteor-roles.

alanning avatar alanning commented on May 20, 2024

Cool! Thanks for the pointer.

from meteor-roles.

CaptainChainsaw avatar CaptainChainsaw commented on May 20, 2024

You're welcome :)

from meteor-roles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.